From patchwork Tue Nov 30 20:29:33 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 520143 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 7263AC433F5 for ; Tue, 30 Nov 2021 20:30:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343709AbhK3UdU (ORCPT ); Tue, 30 Nov 2021 15:33:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54458 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240208AbhK3Uc5 (ORCPT ); Tue, 30 Nov 2021 15:32:57 -0500 Received: from mail-pl1-x62a.google.com (mail-pl1-x62a.google.com [IPv6:2607:f8b0:4864:20::62a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4F9C5C061748; Tue, 30 Nov 2021 12:29:37 -0800 (PST) Received: by mail-pl1-x62a.google.com with SMTP id v19so15844179plo.7; Tue, 30 Nov 2021 12:29:37 -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=i9iXy7CxdOoGBELj+ri1Gg1mukcuBmPWg48FAo6u5tVeQ3oLDGW8j0V/B16z6queXE kpwmd20FMw7rvb+PGc8SXuxgieTRP57x4Tcwc+XD6J9Ogh8rE7FHXsuZavp7oY9w0VSH w6QmHhV+iP2HVLqRIiizpWjvAlnt9S6gTIv62PKmSUpjk4ZPNlMtS0dbSu99fepbj1PW BS7tn1Dfhm9v8/YJsWuKXRrRA3PUJNAbagVacXGBV1jMh/liKi+vqqEee1AS0xaAUBIj 0BiZCV3bpIEn7xUmBFhaK8CsF2ikoFnJON0axOFVNp6dVk1qGFVIbcGDWJh3pybyeVKm JWHQ== 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=7LR1JAq/F14GmXNF2gN5fsFTQcYKp8rZZBu6MKzjNyFBEswd5mONISmK0vTL71/dIa D+0JMjnUkC9A5GZnJqoL6XrNcNwIRNHx15ddZqVGZQuAC4+mHaLlBl7zzUAkDmRFh5Nh xY8YGNt40R7CuRlQfONMzxPNS5TLF7tNTSTynVCrvfIJuAEd7cz/E5vRPs++2kOE93VX PfH3VBBb5Ws9vtvdE3LvUMAEk1ItH9UwT8Gr3H8j0V2grqXMMhMhpeXBGpk3ikMwLH32 wY8pex50eRXzcq9/rcuaDFLAHyPn33q7TlkZGu3KRtVx8gTQ9NkYlIC1iLBzzi4tFOap FA7A== X-Gm-Message-State: AOAM530rKQV/kZGcLY/WWobq8C1F+eP5Dg1cmisPNTrwVM2EI/iPMarI Wwd5Iwc2A2JfrDsqvFAOR7q0mU4gHV8= X-Google-Smtp-Source: ABdhPJyU8olIP5WMuEb5lIT8rLg0BCv4TthDUul45el4g+CVBpm2VpuWFxq7qvuG0LdDPlCLW9HfhA== X-Received: by 2002:a17:90a:7086:: with SMTP id g6mr1649154pjk.34.1638304176306; Tue, 30 Nov 2021 12:29:36 -0800 (PST) Received: from 7YHHR73.igp.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id lw1sm3512435pjb.38.2021.11.30.12.29.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Nov 2021 12:29:35 -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 1/2] scsi: qedi: Fix SYSFS_FLAG_FW_SEL_BOOT formatting Date: Tue, 30 Nov 2021 12:29:33 -0800 Message-Id: <20211130202934.5023-2-f.fainelli@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211130202934.5023-1-f.fainelli@gmail.com> References: <20211130202934.5023-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:29:34 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 520142 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 6515BC433EF for ; Tue, 30 Nov 2021 20:30:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343725AbhK3UdW (ORCPT ); Tue, 30 Nov 2021 15:33:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54462 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235239AbhK3Uc7 (ORCPT ); Tue, 30 Nov 2021 15:32:59 -0500 Received: from mail-pj1-x1031.google.com (mail-pj1-x1031.google.com [IPv6:2607:f8b0:4864:20::1031]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A904EC06174A; Tue, 30 Nov 2021 12:29:38 -0800 (PST) Received: by mail-pj1-x1031.google.com with SMTP id gf14-20020a17090ac7ce00b001a7a2a0b5c3so19168446pjb.5; Tue, 30 Nov 2021 12:29:38 -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=K3xyw5Tvd1U5KQ1mrFO/+H0KY3EB+w3tzJoI+ZyxYe0=; b=hcYDeckMWL2I9E6LZxARadl13u1UWdTvnZPBOovI8S+1QyJN8E62e+MpygBRNRqHfQ f+alPqyPTNDGDJFwIjXgHgL87UJTCtgDAXNHIoVQr/YKyWJCZGds6u3Oa31tUhP0usQK kT6agYQNuhYbTok53AkXbheEbVMc8fp/rE/wG/27SK1FJcMAqTVc9raSx/NH/qyuROu5 Cam8TLy5P8cLAat9OfjBfo9FLVQ3lsw8EvjOwGRI93WsR0IWuRguIJ5HddbZhMFhoeda JsMWXbHtJ0umYfcW7tux/nHXfxGlV8apHVt7IZn1ZZsTWQIAKF3/NN1JNw8WVUdVDcMs KwsQ== 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=K3xyw5Tvd1U5KQ1mrFO/+H0KY3EB+w3tzJoI+ZyxYe0=; b=d5mnOs3h4vaL6EVhjSCIs8Fr6PXrd1QzBHmzvmvrzzV2p8pAxnpKKtiyggY3VNXcSh PgkAK4okH4dMIulTbtbl35OV838X4jUAKes6V7cOAdKoWsrwB4wKbyp8oGrwiak+J7H3 kkAnDYgyzxJFjY7DxloVkbB/mDwkdDJsDlYmD50xKvGdCDBL//xqugKKfJEW57erWdXU X4TEYxUKcA9kUj1xaUqxUryCP4w6CVLv9kR2sdWWGI7zv/wms2ucjKQ8S2tOyVy6fB8L imdc6kIii1KUuXIlI7/eQ8E+mi721iZW51nqrVphBz8o4gNLr5VO8YSWtxXUkl4RJ1sj na5Q== X-Gm-Message-State: AOAM532w5RSryWdT/uVlReZ6zDvPSmklakEKp4ytMvl4LOmdUSO8GgSV N9QVjgK93CcLETYP3d3VFf/UiJfskMs= X-Google-Smtp-Source: ABdhPJyYtTdpo2rjgZi99lS/AoAHlX4vLGv42AIN6d50BPIq6v5WKPDZavTsZ+hCgEd7JutN5gtLHg== X-Received: by 2002:a17:902:b712:b0:143:72b7:4096 with SMTP id d18-20020a170902b71200b0014372b74096mr1716065pls.25.1638304177673; Tue, 30 Nov 2021 12:29:37 -0800 (PST) Received: from 7YHHR73.igp.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id lw1sm3512435pjb.38.2021.11.30.12.29.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Nov 2021 12:29:37 -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 2/2] scsi: qla4xxx: Format SYSFS_FLAG_FW_SEL_BOOT as byte Date: Tue, 30 Nov 2021 12:29:34 -0800 Message-Id: <20211130202934.5023-3-f.fainelli@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211130202934.5023-1-f.fainelli@gmail.com> References: <20211130202934.5023-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..39b2f833eb26 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, "%hdd\n", (char)SYSFS_FLAG_FW_SEL_BOOT); break; case ISCSI_BOOT_TGT_NIC_ASSOC: rc = sprintf(str, "0\n");