Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp2608053rwp; Fri, 14 Jul 2023 08:34:25 -0700 (PDT) X-Google-Smtp-Source: APBJJlE+zMVsnl0/vMhjnBL1/xQGzMJVDjWZ3A32IMrQnP8boY5iT+Wc/1uXud5GrzR2aCbUpu9x X-Received: by 2002:a17:902:d484:b0:1b8:b288:6274 with SMTP id c4-20020a170902d48400b001b8b2886274mr4293686plg.18.1689348865222; Fri, 14 Jul 2023 08:34:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689348865; cv=none; d=google.com; s=arc-20160816; b=GEBIpKhtWo0k+gxef8n6+5dCz5rKqiUIf0CpXWE/jno8V8NL5rG/GVBNYKprnUJiJu pJ01bWmutwzy/cNl6XBE9V+FyUQgC+oVDWKezQM9hDpFKpM77wRHaD7+fpynKzVV1Yt1 OS0poyBMG0xwjhAH1RLYxxirpMTp6UZzA/aTIWKP9nmDnCCD8fyJvXJmDBWU9kKJsLa7 MlxQx2tEjNs59noovM1aJfhB2qGhmAKx6vkw8gt+YaqPUQs+x8YX4KD0YJpApBsnDgpX il0ve9KSGjoSTHnkjUi9sVrIHY3fnzIlnXPKxCSicMdJsoUqWjCQKuVNVfEdCKA2m5Ml 8KIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :mime-version:accept-language:in-reply-to:references:message-id:date :thread-index:thread-topic:subject:cc:to:from; bh=NbGHsljXHugjS9zAkW++9IHdQONthBV8Czj/0j2kNhI=; fh=ZcvX4/XSZD4/koxgZOR1fstY9ZUHOYgXnYGoa1qZV8M=; b=U1bHnU/5e92/sNll0yJbgrlX2gwOO+iHqW3IFJ2c89QcNbLJFP6BgPxnKTnNr5weoM SL+vBTQj3mTKdnTYVs6rC8CYbWEWEGneHV9kAnRdiSrGl0EURqcTjUgdnEFhAGHrVIzS 13aSlH41r2EHxPoOsupaKYU01OvGzGheZYAUAtbNfWcPXfxArvUdNV1bqmT/DXXFaLCf Bqi2Hh+nFBpTRlkq+mSBfyIpKKWbYbnn91rdqWlARntmPLOQbl9rtNL49R24wl6aPYkx PXxH5EA3YkPB9vhEnP7U29AII9bkTIsOFVdIcZktAdOztV+Y7bd95lewrqiHFqgfqyas hMBw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=aculab.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s9-20020a17090330c900b001b81a9aa3d1si6946440plc.223.2023.07.14.08.34.13; Fri, 14 Jul 2023 08:34:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=aculab.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236225AbjGNO4g convert rfc822-to-8bit (ORCPT + 99 others); Fri, 14 Jul 2023 10:56:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33504 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235908AbjGNO4e (ORCPT ); Fri, 14 Jul 2023 10:56:34 -0400 Received: from eu-smtp-delivery-151.mimecast.com (eu-smtp-delivery-151.mimecast.com [185.58.86.151]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 38A6F358C for ; Fri, 14 Jul 2023 07:56:21 -0700 (PDT) Received: from AcuMS.aculab.com (156.67.243.121 [156.67.243.121]) by relay.mimecast.com with ESMTP with both STARTTLS and AUTH (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id uk-mta-249-MHkvfUD6Oua9lH8dct48VA-1; Fri, 14 Jul 2023 15:56:18 +0100 X-MC-Unique: MHkvfUD6Oua9lH8dct48VA-1 Received: from AcuMS.Aculab.com (10.202.163.4) by AcuMS.aculab.com (10.202.163.4) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Fri, 14 Jul 2023 15:56:17 +0100 Received: from AcuMS.Aculab.com ([::1]) by AcuMS.aculab.com ([::1]) with mapi id 15.00.1497.048; Fri, 14 Jul 2023 15:56:17 +0100 From: David Laight To: "'hanyu001@208suo.com'" , "jejb@linux.ibm.com" , "martin.petersen@oracle.com" CC: "linux-kernel@vger.kernel.org" , "linux-scsi@vger.kernel.org" Subject: RE: [PATCH] scsi: snic: Convert snprintf to scnprintf Thread-Topic: [PATCH] scsi: snic: Convert snprintf to scnprintf Thread-Index: AQHZtKnxEf7Ym24Gz0mmUQRzpLpcvK+5XNpA Date: Fri, 14 Jul 2023 14:56:17 +0000 Message-ID: <7cd26b15c9214e7c9b5c76ad67cebb9e@AcuMS.aculab.com> References: In-Reply-To: Accept-Language: en-GB, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.202.205.107] MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: aculab.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,PDS_BAD_THREAD_QP_64, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: hanyu001@208suo.com > Sent: 12 July 2023 11:16 > > Coccinelle reports a warning: > > drivers/scsi/snic/snic_attrs.c:35: WARNING: use scnprintf or sprintf > drivers/scsi/snic/snic_attrs.c:48: WARNING: use scnprintf or sprintf > drivers/scsi/snic/snic_attrs.c:26: WARNING: use scnprintf or sprintf: The function you are looking for is (probably) sysfs_emit(). The PAGE_SIZE constant ought to be a good hint that neither sprintf, snprintf or scnprintf is actually right. David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)