From patchwork Tue Nov 30 20:38:12 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 518636 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 552A0C433FE for ; Tue, 30 Nov 2021 20:38:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343769AbhK3Ulg (ORCPT ); Tue, 30 Nov 2021 15:41:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56458 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233340AbhK3Ule (ORCPT ); Tue, 30 Nov 2021 15:41:34 -0500 Received: from mail-pj1-x102c.google.com (mail-pj1-x102c.google.com [IPv6:2607:f8b0:4864:20::102c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E9E9CC061574; Tue, 30 Nov 2021 12:38:14 -0800 (PST) Received: by mail-pj1-x102c.google.com with SMTP id gb13-20020a17090b060d00b001a674e2c4a8so18368936pjb.4; Tue, 30 Nov 2021 12:38:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=9AUA3ZcTGLZuhJBadpCxqn3J8UAzKaK/JfL/vt60iZs=; b=BNzSUVEtdQRSEaeI7XnJdhtaq/XqYPoO1wdaG44wT4mqBDZi2mBRIuS1HayxPc/7fo vaFiRcYhCB2KlO8Vm0HXTNwYLzf8qRQRjXzCY/sK+5yG93gGrAb5k2MMIEQSQesBH0OB R3ZiEbzYwMDcPXQTvWHpb9mAGyXxQ/Q6tlumaf+rlds2o3gJtfpGzZgHtZhqtc6DoEw6 OOs3WtKygxudRPG2vWzeVbRJaVXybKP8WzoLkJ7OhkDn5TyzThOfYXM5UXvCWty77Wej J/0jI/9Q/2yC27HuJwQDPCqdG/wwpSqBrDDrktxSGnG+WdZJU/Qe4MC8IT9ZBZ+vV8G/ CzGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=9AUA3ZcTGLZuhJBadpCxqn3J8UAzKaK/JfL/vt60iZs=; b=c7DHFgVXLopLofwpZrb0+hW3S3OyemoUS+4Wa05EmuQ6S8lG1QMCDdzdZ92iTwqdus 0xv5JC2rubtYiFj8fzLRydy5kj6LK88Rh4GrdFGua5Cx9L6u+E9z3SxzxEa44fDKDfgS rClH9+eJSVvbYEpztpUcyZfU23B7F7vdu2qvGr05xp6AU7+kJ/P4DbSWUPDjFPYAZT6w 5z9mMpdzMt0MAbgFycG1nYlbDt47I9LQ8hVrmOESYpr1zz5F5dYGaJ37H2THy2Pim9Gu Ks6NR/yC0tfK/2fsPAN6BQV67ukFCHOHM++YzYGBKJJMHeBgh23nbsytLtK8p1nb2COU V+bg== X-Gm-Message-State: AOAM532L5mgpY0Vk3XpBE61ItIHp3mx/xxLNsjvqOIxrvjcy6H8rRSx3 +qz9bO796PiVkcnkciM3IA7KcZjBidI= X-Google-Smtp-Source: ABdhPJzjauQlILGuJjcyWvGep0hjS8osGDlHDkHtTv+K4Psw4GoH/oVWZauLCxMXUnZB89Zizp4KUg== X-Received: by 2002:a17:90a:bb03:: with SMTP id u3mr1634358pjr.85.1638304694105; Tue, 30 Nov 2021 12:38:14 -0800 (PST) Received: from 7YHHR73.igp.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id j7sm23071520pfc.74.2021.11.30.12.38.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Nov 2021 12:38:13 -0800 (PST) From: Florian Fainelli To: linux-kernel@vger.kernel.org Cc: Florian Fainelli , kernel test robot , Nilesh Javali , Manish Rangankar , GR-QLogic-Storage-Upstream@marvell.com (supporter:QLOGIC QL41xxx ISCSI DRIVER), "James E.J. Bottomley" , "Martin K. Petersen" , linux-scsi@vger.kernel.org (open list:QLOGIC QL41xxx ISCSI DRIVER) Subject: [PATCH v2 1/2] scsi: qedi: Fix SYSFS_FLAG_FW_SEL_BOOT formatting Date: Tue, 30 Nov 2021 12:38:12 -0800 Message-Id: <20211130203813.12138-2-f.fainelli@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211130203813.12138-1-f.fainelli@gmail.com> References: <20211130203813.12138-1-f.fainelli@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org The format used for formatting SYSFS_FLAG_FW_SEL_BOOT creates the following warning: drivers/scsi/qedi/qedi_main.c:2259:35: warning: format specifies type 'char' but the argument has type 'int' [-Wformat] rc = snprintf(buf, 3, "%hhd\n", SYSFS_FLAG_FW_SEL_BOOT); Fix this to cast the constant as a char since the intention is to print it via sysfs as a byte. Reported-by: kernel test robot Signed-off-by: Florian Fainelli --- drivers/scsi/qedi/qedi_main.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/scsi/qedi/qedi_main.c b/drivers/scsi/qedi/qedi_main.c index f1c933070884..e7d2bc9026f8 100644 --- a/drivers/scsi/qedi/qedi_main.c +++ b/drivers/scsi/qedi/qedi_main.c @@ -2086,8 +2086,7 @@ static ssize_t qedi_show_boot_eth_info(void *data, int type, char *buf) rc = snprintf(buf, ip_len, fmt, gw); break; case ISCSI_BOOT_ETH_FLAGS: - rc = snprintf(buf, 3, "%hhd\n", - SYSFS_FLAG_FW_SEL_BOOT); + rc = snprintf(buf, 3, "%hhd\n", (char)SYSFS_FLAG_FW_SEL_BOOT); break; case ISCSI_BOOT_ETH_INDEX: rc = snprintf(buf, 3, "0\n"); @@ -2254,7 +2253,7 @@ qedi_show_boot_tgt_info(struct qedi_ctx *qedi, int type, mchap_secret); break; case ISCSI_BOOT_TGT_FLAGS: - rc = snprintf(buf, 3, "%hhd\n", SYSFS_FLAG_FW_SEL_BOOT); + rc = snprintf(buf, 3, "%hhd\n", (char)SYSFS_FLAG_FW_SEL_BOOT); break; case ISCSI_BOOT_TGT_NIC_ASSOC: rc = snprintf(buf, 3, "0\n"); From patchwork Tue Nov 30 20:38:13 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 520140 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 456CDC433FE for ; Tue, 30 Nov 2021 20:38:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343785AbhK3Uli (ORCPT ); Tue, 30 Nov 2021 15:41:38 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56462 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343765AbhK3Ulf (ORCPT ); Tue, 30 Nov 2021 15:41:35 -0500 Received: from mail-pl1-x631.google.com (mail-pl1-x631.google.com [IPv6:2607:f8b0:4864:20::631]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4362BC061574; Tue, 30 Nov 2021 12:38:16 -0800 (PST) Received: by mail-pl1-x631.google.com with SMTP id u11so15886261plf.3; Tue, 30 Nov 2021 12:38:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=adInch71SLEMVkH+ZK5ZoRGHSjRkMo2zTe9ZpiHePds=; b=WbTHCokZgY0W+MXKvSmTBvy0WS1KNBp+NfAYwTjpuVaYTtosXObuHiZ01XiWdSiHC9 brTNv8EzP66HFtVTdI7KUxvbpk2ZQATsLZAxDP89UPQz3/itRFynGrCyZnXC7dhSFCrr PdtUuEErKNClqeS89vCgv1T0Aq01cvLZZ919JszwvVleLQljB8Uv9gusUibq4tmQMg/r S4CFAjHqQegl9P/LaxBdt2HcGnSVIs5hTtKQqP8ZzSeRXAxd8oWOLRYzOyRxZgt658bq Ya/XCjl8Tr55SV/nnVpt8IWAeZQtEW6Xo5hxbVehbemOml0cGxoGMHpCn543MLXZLmnJ r2FQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=adInch71SLEMVkH+ZK5ZoRGHSjRkMo2zTe9ZpiHePds=; b=tZBAJqCF+pbfmg7PfgKSwGxB4ySlUnbPUEPrdH/ARg/FPDbvRKO2huIJbPObXUVdQr ZJWxLU320vdc0f/Oc5pcnUlPWIZ8WzzXD3xPNLp2zN5BElrm2ZbgIkoUI5NeJsmHNsem AN+T6/QIzWJvOVIXUA/3tW/ooBxdFLcivxDvW32XRS+MP5L2K/uRCjnS3iuzM+kSj/jx piiK2s0O/W8CYnw+cBf8a/zN8mSPrzet0WfPR/aghQ4jJ0SgAgaODOKrTp378Es7qEaU SHgEEvaaLu2fgAYGEIt6yiwRDX/ovvxNLNMa03j1U33bhqtavZj4ht3mIFDW6I81F+xX RDzQ== X-Gm-Message-State: AOAM532OEr+FnyutEWVTNsuNaeWISVVY799zAceDdsq+4hCEoD6DPry3 NDo5j9INJSKngGwxTVq7OltruqnbpuU= X-Google-Smtp-Source: ABdhPJz9vjrZ4xYePcRD/8BfStCL7fLuE/lAGIre094lVcas8d8WcKi5ZVNGrJExpqfW9CYEU5y8SQ== X-Received: by 2002:a17:903:2348:b0:141:d60b:ee90 with SMTP id c8-20020a170903234800b00141d60bee90mr1890826plh.15.1638304695415; Tue, 30 Nov 2021 12:38:15 -0800 (PST) Received: from 7YHHR73.igp.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id j7sm23071520pfc.74.2021.11.30.12.38.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Nov 2021 12:38:14 -0800 (PST) From: Florian Fainelli To: linux-kernel@vger.kernel.org Cc: Florian Fainelli , "Martin K . Petersen" , Nilesh Javali , Manish Rangankar , GR-QLogic-Storage-Upstream@marvell.com (supporter:QLOGIC QL41xxx ISCSI DRIVER), "James E.J. Bottomley" , linux-scsi@vger.kernel.org (open list:QLOGIC QL41xxx ISCSI DRIVER) Subject: [PATCH v2 2/2] scsi: qla4xxx: Format SYSFS_FLAG_FW_SEL_BOOT as byte Date: Tue, 30 Nov 2021 12:38:13 -0800 Message-Id: <20211130203813.12138-3-f.fainelli@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211130203813.12138-1-f.fainelli@gmail.com> References: <20211130203813.12138-1-f.fainelli@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org qedi formats SYSFS_FLAG_FW_SEL_BOOT as a byte, and the qla4xxx driver does exactly the same thing, align them for consistency. Suggested-by: Martin K. Petersen Signed-off-by: Florian Fainelli --- drivers/scsi/qla4xxx/ql4_os.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c index 8987acc24dac..8b2aac49782c 100644 --- a/drivers/scsi/qla4xxx/ql4_os.c +++ b/drivers/scsi/qla4xxx/ql4_os.c @@ -5734,7 +5734,7 @@ static ssize_t qla4xxx_show_boot_eth_info(void *data, int type, char *buf) switch (type) { case ISCSI_BOOT_ETH_FLAGS: - rc = sprintf(str, "%d\n", SYSFS_FLAG_FW_SEL_BOOT); + rc = sprintf(str, "%hhd\n", (char)SYSFS_FLAG_FW_SEL_BOOT); break; case ISCSI_BOOT_ETH_INDEX: rc = sprintf(str, "0\n"); @@ -5843,7 +5843,7 @@ qla4xxx_show_boot_tgt_info(struct ql4_boot_session_info *boot_sess, int type, (char *)&boot_conn->chap.intr_secret); break; case ISCSI_BOOT_TGT_FLAGS: - rc = sprintf(str, "%d\n", SYSFS_FLAG_FW_SEL_BOOT); + rc = sprintf(str, "%hhd\n", (char)SYSFS_FLAG_FW_SEL_BOOT); break; case ISCSI_BOOT_TGT_NIC_ASSOC: rc = sprintf(str, "0\n");