From patchwork Tue Jan 16 04:10:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Zhijian Li (Fujitsu)" X-Patchwork-Id: 13520405 Received: from esa4.hc1455-7.c3s2.iphmx.com (esa4.hc1455-7.c3s2.iphmx.com [68.232.139.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7830E79C1; Tue, 16 Jan 2024 04:13:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=fujitsu.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=fujitsu.com X-IronPort-AV: E=McAfee;i="6600,9927,10954"; a="146505738" X-IronPort-AV: E=Sophos;i="6.04,198,1695654000"; d="scan'208";a="146505738" Received: from unknown (HELO oym-r4.gw.nic.fujitsu.com) ([210.162.30.92]) by esa4.hc1455-7.c3s2.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Jan 2024 13:11:56 +0900 Received: from oym-m2.gw.nic.fujitsu.com (oym-nat-oym-m2.gw.nic.fujitsu.com [192.168.87.59]) by oym-r4.gw.nic.fujitsu.com (Postfix) with ESMTP id C8695D9D9D; Tue, 16 Jan 2024 13:11:51 +0900 (JST) Received: from kws-ab3.gw.nic.fujitsu.com (kws-ab3.gw.nic.fujitsu.com [192.51.206.21]) by oym-m2.gw.nic.fujitsu.com (Postfix) with ESMTP id 9F1A7BF3E1; Tue, 16 Jan 2024 13:11:50 +0900 (JST) Received: from edo.cn.fujitsu.com (edo.cn.fujitsu.com [10.167.33.5]) by kws-ab3.gw.nic.fujitsu.com (Postfix) with ESMTP id 0420D200982E5; Tue, 16 Jan 2024 13:11:50 +0900 (JST) Received: from localhost.localdomain (unknown [10.167.226.45]) by edo.cn.fujitsu.com (Postfix) with ESMTP id D30711A0070; Tue, 16 Jan 2024 12:11:43 +0800 (CST) From: Li Zhijian To: linux-kernel@vger.kernel.org Cc: Li Zhijian , Adaptec OEM Raid Solutions , Adrian Hunter , Alexander Shishkin , Alistar Popple , "Aneesh Kumar K.V" , Arnaldo Carvalho de Melo , Artur Paszkiewicz , Benjamin Tissoires , Borislav Petkov , =?utf-8?q?Bruno_Pr=C3=A9mont?= , Chandrakanth patil , Christian Gromm , Christophe Leroy , cocci@inria.fr, Dave Hansen , Don Brace , dri-devel@lists.freedesktop.org, Eddie James , GR-QLogic-Storage-Upstream@marvell.com, Hannes Reinecke , Hannes Reinecke , Hans de Goede , Helge Deller , HighPoint Linux Team , "H. Peter Anvin" , Ian Rogers , =?utf-8?q?Ilpo_J=C3=A4rvinen?= , Ingo Molnar , Jack Wang , "James E.J. Bottomley" , "James E.J. Bottomley" , James Morse , Jeremy Kerr , Jiri Kosina , Jiri Olsa , Joel Stanley , Jonathan Cameron , Julia Lawall , Karan Tilak Kumar , Kashyap Desai , Ketan Mukadam , Laurentiu Tudor , linux-arm-kernel@lists.infradead.org, linux-edac@vger.kernel.org, linux-fbdev@vger.kernel.org, linux-fsi@lists.ozlabs.org, linux-iio@vger.kernel.org, linux-input@vger.kernel.org, linux-perf-users@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-scsi@vger.kernel.org, Manish Rangankar , Mark Rutland , "Martin K. Petersen" , Mauro Carvalho Chehab , megaraidlinux.pdl@broadcom.com, Michael Cyr , Michael Ellerman , Michal Januszewski , MPT-FusionLinux.pdl@broadcom.com, Namhyung Kim , "Naveen N. Rao" , netdev@vger.kernel.org, Nicholas Piggin , Nicolas Palix , Nilesh Javali , Parthiban Veerasooran , Peter Zijlstra , platform-driver-x86@vger.kernel.org, Richard Cochran , Robert Richter , Russell King , Sathya Prakash , Satish Kharat , Sesidhar Baddela , Shivasharan S , Sreekanth Reddy , Srinivas Pandruvada , Stefan Achatz , storagedev@microchip.com, Stuart Yoder , Suganath Prabu Subramani , Sumit Saxena , target-devel@vger.kernel.org, Thomas Gleixner , Tony Luck , Tyrel Datwyler , Vadim Pasternak , x86@kernel.org Subject: [PATCH 00/42] Fix coccicheck warnings Date: Tue, 16 Jan 2024 12:10:47 +0800 Message-Id: <20240116041129.3937800-1-lizhijian@fujitsu.com> X-Mailer: git-send-email 2.31.1 Precedence: bulk X-Mailing-List: linux-fbdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-TM-AS-Product-Ver: IMSS-9.1.0.1417-9.0.0.1002-28122.004 X-TM-AS-User-Approved-Sender: Yes X-TMASE-Version: IMSS-9.1.0.1417-9.0.1002-28122.004 X-TMASE-Result: 10--5.338000-10.000000 X-TMASE-MatchedRID: APZBv0eB5fJy4CNxYSkcLoL5ja7E+OhyuoYFb0nRiqO/XSsQNWtCeIAj 6kt+TewHC3vXNyJNBUS/2a/w1wS2snh1rPkUeh+7A9lly13c/gEMZvHcAgmELNM4cBkOddRug4T d/DBNkVPBV4b4vif9P70QU2u8uQPlKz8U6m7mv8Csxn4GpC3Y2mDbldQedDmvdr2Udl3Og/5evz 2JvPJmxmu4/NMq7ELJiJZIlifpj2n9iEfE2OtmsHZwubmkurW/Urr7Qc5WhKixViPWo8HTYkdes bjoBZ/kx3iFO+XIjdvtpuHnoJaRs49oUcx9VMLggxsfzkNRlfLdB/CxWTRRu25FeHtsUoHuFXh8 AHLXJNBIMK2NL4dx8OCrxKVMkOf0hhdqTS9iikoJK2MK45H+GA== X-TMASE-SNAP-Result: 1.821001.0001-0-1-22:0,33:0,34:0-0 make coccicheck COCCI=$PWD/scripts/coccinelle/api/device_attr_show.cocci` complians some warnnings as following[1]: Not sure if someone had tried these fixes, feel free to ignore this patch set if we have come to a *NOT-FIX* conclusion before :) This patch set also fix a few snprintf() beside coccicheck reported. For example, some thing like xxx_show() { rc = snprintf(); ... return rc; } TODOs: 1. Fix other abused cases that coccicheck has not detected. For example, ./drivers/scsi/scsi_transport_fc.c has other places using snprint inside the macro. 2. Improve device_attr_show.cocci to detect sprintf() and fix them [1] $ make coccicheck COCCI=$PWD/scripts/coccinelle/api/device_attr_show.cocci ... ./arch/arm/mm/cache-l2x0-pmu.c:346:8-16: WARNING: use scnprintf or sprintf ./arch/x86/events/amd/core.c:1282:8-16: WARNING: use scnprintf or sprintf ./arch/x86/events/core.c:1895:11-19: WARNING: use scnprintf or sprintf ./arch/x86/events/core.c:2542:8-16: WARNING: use scnprintf or sprintf ./arch/x86/events/core.c:2600:8-16: WARNING: use scnprintf or sprintf ./arch/x86/events/intel/core.c:5496:8-16: WARNING: use scnprintf or sprintf ./arch/x86/events/intel/core.c:5530:8-16: WARNING: use scnprintf or sprintf ./arch/x86/events/intel/core.c:5546:8-16: WARNING: use scnprintf or sprintf ./arch/x86/events/intel/pt.c:99:8-16: WARNING: use scnprintf or sprintf ./drivers/bus/fsl-mc/fsl-mc-bus.c:205:8-16: WARNING: use scnprintf or sprintf ./drivers/edac/edac_mc_sysfs.c:210:8-16: WARNING: use scnprintf or sprintf ./drivers/edac/edac_mc_sysfs.c:518:8-16: WARNING: use scnprintf or sprintf ./drivers/fsi/fsi-master-ast-cf.c:1086:8-16: WARNING: use scnprintf or sprintf ./drivers/fsi/fsi-master-gpio.c:721:8-16: WARNING: use scnprintf or sprintf ./drivers/hid/hid-lenovo.c:558:8-16: WARNING: use scnprintf or sprintf ./drivers/hid/hid-lenovo.c:602:8-16: WARNING: use scnprintf or sprintf ./drivers/hid/hid-lenovo.c:792:8-16: WARNING: use scnprintf or sprintf ./drivers/hid/hid-lenovo.c:822:8-16: WARNING: use scnprintf or sprintf ./drivers/hid/hid-lenovo.c:852:8-16: WARNING: use scnprintf or sprintf ./drivers/hid/hid-lenovo.c:882:8-16: WARNING: use scnprintf or sprintf ./drivers/hid/hid-lenovo.c:912:8-16: WARNING: use scnprintf or sprintf ./drivers/hid/hid-lenovo.c:941:8-16: WARNING: use scnprintf or sprintf ./drivers/hid/hid-picolcd_core.c:259:9-17: WARNING: use scnprintf or sprintf ./drivers/hid/hid-picolcd_core.c:304:8-16: WARNING: use scnprintf or sprintf ./drivers/hid/hid-roccat-isku.c:64:8-16: WARNING: use scnprintf or sprintf ./drivers/hid/hid-roccat-kone.c:403:8-16: WARNING: use scnprintf or sprintf ./drivers/hid/hid-roccat-kone.c:412:8-16: WARNING: use scnprintf or sprintf ./drivers/hid/hid-roccat-kone.c:435:8-16: WARNING: use scnprintf or sprintf ./drivers/hid/hid-roccat-kone.c:444:8-16: WARNING: use scnprintf or sprintf ./drivers/hid/hid-roccat-kone.c:454:8-16: WARNING: use scnprintf or sprintf ./drivers/hid/hid-roccat-kone.c:556:8-16: WARNING: use scnprintf or sprintf ./drivers/hid/hid-roccat-koneplus.c:245:8-16: WARNING: use scnprintf or sprintf ./drivers/hid/hid-roccat-koneplus.c:312:8-16: WARNING: use scnprintf or sprintf ./drivers/hid/hid-roccat-kovaplus.c:275:8-16: WARNING: use scnprintf or sprintf ./drivers/hid/hid-roccat-kovaplus.c:328:8-16: WARNING: use scnprintf or sprintf ./drivers/hid/hid-roccat-kovaplus.c:337:8-16: WARNING: use scnprintf or sprintf ./drivers/hid/hid-roccat-kovaplus.c:347:8-16: WARNING: use scnprintf or sprintf ./drivers/hid/hid-roccat-kovaplus.c:368:8-16: WARNING: use scnprintf or sprintf ./drivers/hid/hid-roccat-pyra.c:286:8-16: WARNING: use scnprintf or sprintf ./drivers/hid/hid-roccat-pyra.c:303:8-16: WARNING: use scnprintf or sprintf ./drivers/hid/hid-roccat-pyra.c:324:8-16: WARNING: use scnprintf or sprintf ./drivers/hid/hid-sensor-custom.c:375:10-18: WARNING: use scnprintf or sprintf ./drivers/message/fusion/mptscsih.c:3100:8-16: WARNING: use scnprintf or sprintf ./drivers/message/fusion/mptscsih.c:3116:8-16: WARNING: use scnprintf or sprintf ./drivers/message/fusion/mptscsih.c:3132:8-16: WARNING: use scnprintf or sprintf ./drivers/message/fusion/mptscsih.c:3145:8-16: WARNING: use scnprintf or sprintf ./drivers/message/fusion/mptscsih.c:3159:8-16: WARNING: use scnprintf or sprintf ./drivers/message/fusion/mptscsih.c:3173:8-16: WARNING: use scnprintf or sprintf ./drivers/message/fusion/mptscsih.c:3186:8-16: WARNING: use scnprintf or sprintf ./drivers/message/fusion/mptscsih.c:3198:8-16: WARNING: use scnprintf or sprintf ./drivers/message/fusion/mptscsih.c:3211:8-16: WARNING: use scnprintf or sprintf ./drivers/message/fusion/mptscsih.c:3224:8-16: WARNING: use scnprintf or sprintf ./drivers/message/fusion/mptscsih.c:3237:8-16: WARNING: use scnprintf or sprintf ./drivers/message/fusion/mptscsih.c:3250:8-16: WARNING: use scnprintf or sprintf ./drivers/most/core.c:211:8-16: WARNING: use scnprintf or sprintf ./drivers/most/core.c:222:8-16: WARNING: use scnprintf or sprintf ./drivers/most/core.c:233:8-16: WARNING: use scnprintf or sprintf ./drivers/most/core.c:244:8-16: WARNING: use scnprintf or sprintf ./drivers/most/core.c:254:8-16: WARNING: use scnprintf or sprintf ./drivers/most/core.c:263:8-16: WARNING: use scnprintf or sprintf ./drivers/most/core.c:272:8-16: WARNING: use scnprintf or sprintf ./drivers/most/core.c:282:9-17: WARNING: use scnprintf or sprintf ./drivers/most/core.c:297:10-18: WARNING: use scnprintf or sprintf ./drivers/most/core.c:309:8-16: WARNING: use scnprintf or sprintf ./drivers/most/core.c:318:8-16: WARNING: use scnprintf or sprintf ./drivers/most/core.c:326:8-16: WARNING: use scnprintf or sprintf ./drivers/most/core.c:398:8-16: WARNING: use scnprintf or sprintf ./drivers/most/core.c:409:9-17: WARNING: use scnprintf or sprintf ./drivers/platform/mellanox/mlxbf-bootctl.c:466:8-16: WARNING: use scnprintf or sprintf ./drivers/platform/mellanox/mlxbf-bootctl.c:584:8-16: WARNING: use scnprintf or sprintf ./drivers/platform/mellanox/mlxbf-bootctl.c:635:8-16: WARNING: use scnprintf or sprintf ./drivers/platform/mellanox/mlxbf-bootctl.c:686:8-16: WARNING: use scnprintf or sprintf ./drivers/platform/mellanox/mlxbf-bootctl.c:737:8-16: WARNING: use scnprintf or sprintf ./drivers/platform/mellanox/mlxbf-bootctl.c:788:8-16: WARNING: use scnprintf or sprintf ./drivers/platform/mellanox/mlxbf-bootctl.c:839:8-16: WARNING: use scnprintf or sprintf ./drivers/ptp/ptp_sysfs.c:27:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/53c700.c:2074:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/aacraid/linit.c:1299:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/aacraid/linit.c:1325:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/aacraid/linit.c:1332:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/aacraid/linit.c:561:9-17: WARNING: use scnprintf or sprintf ./drivers/scsi/aacraid/linit.c:588:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/aic94xx/aic94xx_init.c:267:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/aic94xx/aic94xx_init.c:276:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/aic94xx/aic94xx_init.c:284:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/aic94xx/aic94xx_init.c:455:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/arcmsr/arcmsr_attr.c:261:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/arcmsr/arcmsr_attr.c:273:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/arcmsr/arcmsr_attr.c:285:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/arcmsr/arcmsr_attr.c:297:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/arcmsr/arcmsr_attr.c:309:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/arcmsr/arcmsr_attr.c:322:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/arcmsr/arcmsr_attr.c:335:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/arcmsr/arcmsr_attr.c:348:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/arcmsr/arcmsr_attr.c:361:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/arcmsr/arcmsr_attr.c:374:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/be2iscsi/be_mgmt.c:1145:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/be2iscsi/be_mgmt.c:1164:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/be2iscsi/be_mgmt.c:1251:9-17: WARNING: use scnprintf or sprintf ./drivers/scsi/be2iscsi/be_mgmt.c:1280:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/fcoe/fcoe_sysfs.c:253:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/fcoe/fcoe_sysfs.c:268:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/fcoe/fcoe_sysfs.c:376:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/fnic/fnic_attrs.c:17:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/fnic/fnic_attrs.c:23:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/fnic/fnic_attrs.c:31:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/hpsa.c:528:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/hpsa.c:538:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/hpsa.c:549:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/hpsa.c:561:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/hpsa.c:645:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/hpsa.c:724:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/hpsa.c:746:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/hpsa.c:775:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/hpsa.c:799:9-17: WARNING: use scnprintf or sprintf ./drivers/scsi/hpsa.c:898:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/hpsa.c:908:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/hptiop.c:1114:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/hptiop.c:1123:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/ibmvscsi/ibmvfc.c:3483:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/ibmvscsi/ibmvfc.c:3493:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/ibmvscsi/ibmvfc.c:3503:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/ibmvscsi/ibmvfc.c:3513:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/ibmvscsi/ibmvfc.c:3522:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/ibmvscsi/ibmvfc.c:3530:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c:3619:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c:3625:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c:3633:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/isci/init.c:140:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/megaraid/megaraid_sas_base.c:3336:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/megaraid/megaraid_sas_base.c:3382:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/megaraid/megaraid_sas_base.c:3389:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/megaraid/megaraid_sas_base.c:3399:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/megaraid/megaraid_sas_base.c:3409:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/megaraid/megaraid_sas_base.c:3419:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/megaraid/megaraid_sas_base.c:3473:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/mpt3sas/mpt3sas_ctl.c:2825:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/mpt3sas/mpt3sas_ctl.c:2850:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/mpt3sas/mpt3sas_ctl.c:2873:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/mpt3sas/mpt3sas_ctl.c:2893:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/mpt3sas/mpt3sas_ctl.c:2912:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/mpt3sas/mpt3sas_ctl.c:2932:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/mpt3sas/mpt3sas_ctl.c:2952:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/mpt3sas/mpt3sas_ctl.c:2971:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/mpt3sas/mpt3sas_ctl.c:2990:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/mpt3sas/mpt3sas_ctl.c:3012:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/mpt3sas/mpt3sas_ctl.c:3034:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/mpt3sas/mpt3sas_ctl.c:3055:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/mpt3sas/mpt3sas_ctl.c:3077:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/mpt3sas/mpt3sas_ctl.c:3097:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/mpt3sas/mpt3sas_ctl.c:3133:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/mpt3sas/mpt3sas_ctl.c:3170:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/mpt3sas/mpt3sas_ctl.c:3198:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/mpt3sas/mpt3sas_ctl.c:3320:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/mpt3sas/mpt3sas_ctl.c:3407:9-17: WARNING: use scnprintf or sprintf ./drivers/scsi/mpt3sas/mpt3sas_ctl.c:3828:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/mpt3sas/mpt3sas_ctl.c:3848:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/mpt3sas/mpt3sas_ctl.c:3996:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/mpt3sas/mpt3sas_ctl.c:4018:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/mpt3sas/mpt3sas_ctl.c:4056:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/myrb.c:1770:9-17: WARNING: use scnprintf or sprintf ./drivers/scsi/myrb.c:1889:10-18: WARNING: use scnprintf or sprintf ./drivers/scsi/myrb.c:1906:9-17: WARNING: use scnprintf or sprintf ./drivers/scsi/myrb.c:2143:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/myrb.c:2153:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/myrb.c:2163:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/myrs.c:1061:9-17: WARNING: use scnprintf or sprintf ./drivers/scsi/myrs.c:1089:9-17: WARNING: use scnprintf or sprintf ./drivers/scsi/myrs.c:1193:9-17: WARNING: use scnprintf or sprintf ./drivers/scsi/myrs.c:1306:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/myrs.c:1316:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/myrs.c:1391:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/myrs.c:1401:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/myrs.c:1411:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/myrs.c:1421:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/myrs.c:1491:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/myrs.c:942:9-17: WARNING: use scnprintf or sprintf ./drivers/scsi/ncr53c8xx.c:8034:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/pcmcia/sym53c500_cs.c:627:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/pm8001/pm8001_ctl.c:883:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/pmcraid.c:3541:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/pmcraid.c:3602:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/pmcraid.c:3635:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/qla4xxx/ql4_attr.c:159:9-17: WARNING: use scnprintf or sprintf ./drivers/scsi/qla4xxx/ql4_attr.c:173:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/qla4xxx/ql4_attr.c:181:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/qla4xxx/ql4_attr.c:190:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/qla4xxx/ql4_attr.c:200:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/qla4xxx/ql4_attr.c:210:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/qla4xxx/ql4_attr.c:223:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/qla4xxx/ql4_attr.c:235:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/qla4xxx/ql4_attr.c:247:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/qla4xxx/ql4_attr.c:256:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/qla4xxx/ql4_attr.c:264:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/qla4xxx/ql4_attr.c:273:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/qla4xxx/ql4_attr.c:281:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/qla4xxx/ql4_attr.c:303:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/qla4xxx/ql4_attr.c:312:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/scsi_sysfs.c:1112:9-17: WARNING: use scnprintf or sprintf ./drivers/scsi/scsi_sysfs.c:1202:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/scsi_sysfs.c:231:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/scsi_sysfs.c:277:9-17: WARNING: use scnprintf or sprintf ./drivers/scsi/scsi_sysfs.c:327:9-17: WARNING: use scnprintf or sprintf ./drivers/scsi/scsi_sysfs.c:385:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/scsi_sysfs.c:402:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/scsi_sysfs.c:680:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/scsi_sysfs.c:689:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/scsi_sysfs.c:701:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/scsi_sysfs.c:722:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/scsi_sysfs.c:858:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/scsi_sysfs.c:873:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/scsi_sysfs.c:953:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/scsi_sysfs.c:979:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/scsi_transport_fc.c:1123:9-17: WARNING: use scnprintf or sprintf ./drivers/scsi/scsi_transport_fc.c:1218:10-18: WARNING: use scnprintf or sprintf ./drivers/scsi/scsi_transport_fc.c:1286:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/scsi_transport_fc.c:1304:9-17: WARNING: use scnprintf or sprintf ./drivers/scsi/scsi_transport_fc.c:1665:9-17: WARNING: use scnprintf or sprintf ./drivers/scsi/scsi_transport_fc.c:1891:9-17: WARNING: use scnprintf or sprintf ./drivers/scsi/scsi_transport_fc.c:1915:9-17: WARNING: use scnprintf or sprintf ./drivers/scsi/scsi_transport_fc.c:1967:9-17: WARNING: use scnprintf or sprintf ./drivers/scsi/scsi_transport_fc.c:2000:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/scsi_transport_sas.c:1180:9-17: WARNING: use scnprintf or sprintf ./drivers/scsi/scsi_transport_sas.c:525:9-17: WARNING: use scnprintf or sprintf ./drivers/scsi/scsi_transport_sas.c:572:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/snic/snic_attrs.c:16:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/snic/snic_attrs.c:26:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/snic/snic_attrs.c:35:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/snic/snic_attrs.c:48:8-16: WARNING: use scnprintf or sprintf ./drivers/video/fbdev/uvesafb.c:1549:8-16: WARNING: use scnprintf or sprintf ./kernel/cpu.c:3013:8-16: WARNING: use scnprintf or sprintf ./kernel/cpu.c:3026:8-16: WARNING: use scnprintf or sprintf CC: Adaptec OEM Raid Solutions CC: Adrian Hunter CC: Alexander Shishkin CC: Alistar Popple CC: "Aneesh Kumar K.V" CC: Arnaldo Carvalho de Melo CC: Artur Paszkiewicz CC: Benjamin Tissoires CC: Borislav Petkov CC: "Bruno Prémont" CC: Chandrakanth patil CC: Christian Gromm CC: Christophe Leroy CC: cocci@inria.fr CC: Dave Hansen CC: Don Brace CC: dri-devel@lists.freedesktop.org CC: Eddie James CC: GR-QLogic-Storage-Upstream@marvell.com CC: Hannes Reinecke CC: Hannes Reinecke CC: Hans de Goede CC: Helge Deller CC: HighPoint Linux Team CC: "H. Peter Anvin" CC: Ian Rogers CC: "Ilpo Järvinen" CC: Ingo Molnar CC: Jack Wang CC: "James E.J. Bottomley" CC: "James E.J. Bottomley" CC: James Morse CC: Jeremy Kerr CC: Jiri Kosina CC: Jiri Olsa CC: Joel Stanley CC: Jonathan Cameron CC: Julia Lawall CC: Karan Tilak Kumar CC: Kashyap Desai CC: Ketan Mukadam CC: Laurentiu Tudor CC: linux-arm-kernel@lists.infradead.org CC: linux-edac@vger.kernel.org CC: linux-fbdev@vger.kernel.org CC: linux-fsi@lists.ozlabs.org CC: linux-iio@vger.kernel.org CC: linux-input@vger.kernel.org CC: linux-kernel@vger.kernel.org CC: linux-perf-users@vger.kernel.org CC: linuxppc-dev@lists.ozlabs.org CC: linux-scsi@vger.kernel.org CC: Manish Rangankar CC: Mark Rutland CC: "Martin K. Petersen" CC: Mauro Carvalho Chehab CC: megaraidlinux.pdl@broadcom.com CC: Michael Cyr CC: Michael Ellerman CC: Michal Januszewski CC: MPT-FusionLinux.pdl@broadcom.com CC: Namhyung Kim CC: "Naveen N. Rao" CC: netdev@vger.kernel.org CC: Nicholas Piggin CC: Nicolas Palix CC: Nilesh Javali CC: Parthiban Veerasooran CC: Peter Zijlstra CC: platform-driver-x86@vger.kernel.org CC: Richard Cochran CC: Robert Richter CC: Russell King CC: Sathya Prakash CC: Satish Kharat CC: Sesidhar Baddela CC: Shivasharan S CC: Sreekanth Reddy CC: Srinivas Pandruvada CC: Stefan Achatz CC: storagedev@microchip.com CC: Stuart Yoder CC: Suganath Prabu Subramani CC: Sumit Saxena CC: target-devel@vger.kernel.org CC: Thomas Gleixner CC: Tony Luck CC: Tyrel Datwyler CC: Vadim Pasternak CC: x86@kernel.org Li Zhijian (42): coccinelle: device_attr_show.cocci: update description and warning message arch/arm/mm: Convert snprintf to sysfs_emit arch/x86/events/amd: Convert snprintf to sysfs_emit arch/x86/events/core: Convert snprintf to sysfs_emit arch/x86/events/intel: Convert snprintf to sysfs_emit drivers/bus/fsl-mc: Convert snprintf to sysfs_emit drivers/edac: Convert snprintf to sysfs_emit drivers/fsi: Convert snprintf to sysfs_emit drivers/hid/hid-lenovo: Convert snprintf to sysfs_emit drivers/hid/hid-roccat-*: Convert snprintf to sysfs_emit drivers/hid: Convert snprintf to sysfs_emit drivers/message/fusion: Convert snprintf to sysfs_emit drivers/most: Convert snprintf to sysfs_emit drivers/platform/mellanox: Convert snprintf to sysfs_emit drivers/ptp: Convert snprintf to sysfs_emit drivers/scsi/53c700: Convert snprintf to sysfs_emit drivers/scsi/aacraid: Convert snprintf to sysfs_emit drivers/scsi/aic94xx: Convert snprintf to sysfs_emit drivers/scsi/arcmsr: Convert snprintf to sysfs_emit drivers/scsi/be2iscsi: Convert snprintf to sysfs_emit drivers/scsi/fcoe: Convert snprintf to sysfs_emit drivers/scsi/fnic: Convert snprintf to sysfs_emit drivers/scsi/hpsa: Convert snprintf to sysfs_emit drivers/scsi/hptiop: Convert snprintf to sysfs_emit drivers/scsi/ibmvscsi: Convert snprintf to sysfs_emit drivers/scsi/ibmvscsi_tgt: Convert snprintf to sysfs_emit drivers/scsi/isci: Convert snprintf to sysfs_emit drivers/scsi/megaraid: Convert snprintf to sysfs_emit drivers/scsi/mpt3sas: Convert snprintf to sysfs_emit drivers/scsi/myrb: Convert snprintf to sysfs_emit drivers/scsi/myrs: Convert snprintf to sysfs_emit drivers/scsi/ncr53c8xx: Convert snprintf to sysfs_emit drivers/scsi/pcmcia/sym53c500_cs: Convert snprintf to sysfs_emit drivers/scsi/pm8001: Convert snprintf to sysfs_emit drivers/scsi/pmcraid: Convert snprintf to sysfs_emit drivers/scsi/qla4xxx/ql4_attr: Convert snprintf to sysfs_emit drivers/scsi/scsi_sysfs: Convert snprintf to sysfs_emit drivers/scsi/scsi_transport_fc: Convert snprintf to sysfs_emit drivers/scsi/scsi_transport_sas: Convert snprintf to sysfs_emit drivers/scsi/snic/snic_attrs: Convert snprintf to sysfs_emit drivers/video/fbdev/uvesafb: Convert snprintf to sysfs_emit kernel/cpu: Convert snprintf to sysfs_emit arch/arm/mm/cache-l2x0-pmu.c | 2 +- arch/x86/events/amd/core.c | 2 +- arch/x86/events/core.c | 6 +- arch/x86/events/intel/core.c | 6 +- arch/x86/events/intel/pt.c | 2 +- drivers/bus/fsl-mc/fsl-mc-bus.c | 2 +- drivers/edac/edac_mc_sysfs.c | 5 +- drivers/fsi/fsi-master-ast-cf.c | 3 +- drivers/fsi/fsi-master-gpio.c | 3 +- drivers/hid/hid-lenovo.c | 19 +++--- drivers/hid/hid-picolcd_core.c | 6 +- drivers/hid/hid-roccat-isku.c | 2 +- drivers/hid/hid-roccat-kone.c | 12 ++-- drivers/hid/hid-roccat-koneplus.c | 4 +- drivers/hid/hid-roccat-kovaplus.c | 10 +-- drivers/hid/hid-roccat-pyra.c | 6 +- drivers/hid/hid-sensor-custom.c | 3 +- drivers/message/fusion/mptscsih.c | 25 ++++---- drivers/most/core.c | 61 +++++++++---------- drivers/platform/mellanox/mlxbf-bootctl.c | 14 ++--- drivers/ptp/ptp_sysfs.c | 3 +- drivers/scsi/53c700.c | 2 +- drivers/scsi/aacraid/linit.c | 17 +++--- drivers/scsi/aic94xx/aic94xx_init.c | 15 +++-- drivers/scsi/arcmsr/arcmsr_attr.c | 40 +++--------- drivers/scsi/be2iscsi/be_mgmt.c | 20 +++--- drivers/scsi/fcoe/fcoe_sysfs.c | 8 +-- drivers/scsi/fnic/fnic_attrs.c | 7 +-- drivers/scsi/hpsa.c | 36 +++++------ drivers/scsi/hptiop.c | 4 +- drivers/scsi/ibmvscsi/ibmvfc.c | 22 +++---- drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c | 6 +- drivers/scsi/isci/init.c | 2 +- drivers/scsi/megaraid/megaraid_sas_base.c | 15 +++-- drivers/scsi/mpt3sas/mpt3sas_ctl.c | 60 +++++++++--------- drivers/scsi/myrb.c | 38 ++++++------ drivers/scsi/myrs.c | 56 ++++++++--------- drivers/scsi/ncr53c8xx.c | 2 +- drivers/scsi/pcmcia/sym53c500_cs.c | 2 +- drivers/scsi/pm8001/pm8001_ctl.c | 6 +- drivers/scsi/pmcraid.c | 11 ++-- drivers/scsi/qla4xxx/ql4_attr.c | 48 +++++++-------- drivers/scsi/scsi_sysfs.c | 34 +++++------ drivers/scsi/scsi_transport_fc.c | 34 +++++------ drivers/scsi/scsi_transport_sas.c | 22 +++---- drivers/scsi/snic/snic_attrs.c | 10 +-- drivers/video/fbdev/uvesafb.c | 2 +- kernel/cpu.c | 4 +- scripts/coccinelle/api/device_attr_show.cocci | 10 ++- 49 files changed, 343 insertions(+), 386 deletions(-)