From patchwork Fri Nov 10 03:52:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sunil V L X-Patchwork-Id: 163862 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b129:0:b0:403:3b70:6f57 with SMTP id q9csp1294788vqs; Fri, 10 Nov 2023 10:13:09 -0800 (PST) X-Google-Smtp-Source: AGHT+IHZhjoKBnp3cIKyzaWaDg9HMUteu9z0ztUxuG3toVQuKTZo9hRPUF+YvT2rcKNeybIC1uBD X-Received: by 2002:a17:902:db0f:b0:1c9:dfb8:a5a0 with SMTP id m15-20020a170902db0f00b001c9dfb8a5a0mr51556plx.10.1699639989072; Fri, 10 Nov 2023 10:13:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699639989; cv=none; d=google.com; s=arc-20160816; b=DmrZV94IXU7ruxpi+K4TRy/u71QKjhWyIxOKDETpEJzT2cU5tCqJLWLNvLHdflBGJh N4+rbDagmWnyRpYgfG75GXW4qCEPjhWd42kD2xN7tOvwW9OXtBIezaECqLncUl7dghkQ eg5Bn+jA/NpKkeTfKAWMdmNxGuS1RjjY1zOG2bitgKzSGMHvSdAqmth4eSnef2CCF77C Za+M+LtH7U/cg7umh8V07Q1MAC7czQMR2txbl8jGy1jocq1YrC8m3veJFuT7r4C4NpdJ cMxhrD7YeGe+A5cwqr3kA5+pdBD4SnTvqiMB9O09zNPzM+PUdDhAXspr5fzhkqmABDPD AWhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=OZkVaBG0vteO7021P9A28Nc2SPcEoHes6KG3sccedrc=; fh=qKh6B/qVxG8UFRQ/ZIgwS7FVB0+QEodUg8gyNcNUt8U=; b=YPjmHZmhzYRsddE9ivGQ5bezV3X1hAXUN+VeQwl/b0OE51JoiO8zEr2E9cOuEULy5b KnlU3SKh1kV65UTMi9ifdLoCcJsV/F+52G9dTSJn7BXph+l0uYD7hb4p6bp4MOs/5uBK uIG8w6aOUXG/qOBCdjZZ24TKfjOx4yQeqpX8kWrS4HxboSMZFcblcWHuPv21/Vy2W2US wN9esxT7dMW2gJN/igFY6fkftXKTecwCDM2IuKcJDNfLASqy2xa0KPpKKRqe/zzd5jeW 3+nI/q+r4jwTVegCdAZ73i4gyqxAAN3MCpt+lGfGWYI7uIF7OPm/lT2C5JFmWTUJmKsF tGkg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ventanamicro.com header.s=google header.b="O/gVJH+F"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id kh4-20020a170903064400b001c72c258f82si7563905plb.99.2023.11.10.10.13.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Nov 2023 10:13:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@ventanamicro.com header.s=google header.b="O/gVJH+F"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 8BCF283DD5EA; Fri, 10 Nov 2023 10:12:34 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343719AbjKJSJu (ORCPT + 30 others); Fri, 10 Nov 2023 13:09:50 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33150 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345845AbjKJSG5 (ORCPT ); Fri, 10 Nov 2023 13:06:57 -0500 Received: from mail-pg1-x531.google.com (mail-pg1-x531.google.com [IPv6:2607:f8b0:4864:20::531]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6229B76BC for ; Thu, 9 Nov 2023 22:37:20 -0800 (PST) Received: by mail-pg1-x531.google.com with SMTP id 41be03b00d2f7-53fbf2c42bfso1330701a12.3 for ; Thu, 09 Nov 2023 22:37:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1699598240; x=1700203040; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=OZkVaBG0vteO7021P9A28Nc2SPcEoHes6KG3sccedrc=; b=O/gVJH+Fu6wVesV+pChgZ4ELO5JGjDzD77RPRTEzzCkxFfgPWkWAcwbu0IQQxOeist 7TqtlTOb3SxB9K9eQ5Ma0sRupY1Je8BNIRltVqElfKG8kEcX3Yj1yvN21lQQ7TN/lDSF k+ltXn9g0GEnVAf9FwxDsNBFye/gXaAiPcxePLqu3RuUnN3VsJLlZFzjml6SHrVex3Ji AtyRtGOPwoaT5iOez28GhuafEFPS1kTHhpaY4hUUTlJGDIjKru0e1hdYknTlw+TNVmea aIT9k32P76kMGSRqyoTCnE5Gy1MqTIH9y4jcLGElndU/G7nVShG/AEjeUcgn/baVMFXX 9tDg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699598240; x=1700203040; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=OZkVaBG0vteO7021P9A28Nc2SPcEoHes6KG3sccedrc=; b=fK+nXrdY4morUa3FqwCftXW0xvbyJ16eyrQFJBUpwpL1P6DRJd2HLI3GEqCYCnFoUO hb8xKMovv/PUKqTkTPyNjCwyslgR++23ag8/Pv+Z3RRgUQL8XUMPTbRPxKvgiiRoFPDT Kh7kEBJgqO3ovnpH74NECR8TebDYA8vdmdRF9hEAyBo2tUQNqyOr3cBqIKXxp+kgatHa zThwGDm06GuLsZsjBqO1KUu0BSngMakqTkTnBZkJR1AP4e3kZaZYCtaeI9WtnznsWwDW ZIHR5Sh1a3LK9wtp8gNGXuPaI0E7epVzH9Mj5JQzNTPSEpmzC1TCBoecRQByMeX2W+2L /dmg== X-Gm-Message-State: AOJu0YxSUeAa0XATFlAFPvf/fqiubi2Nccrb06C3X0JmkA7aFu5lA0cq iYSQzENzBKxRWWiyXkMSkVosEZqrsNKug6HNzyBIrg== X-Received: by 2002:a17:902:6547:b0:1ca:abe:a08b with SMTP id d7-20020a170902654700b001ca0abea08bmr5289987pln.68.1699588381511; Thu, 09 Nov 2023 19:53:01 -0800 (PST) Received: from sunil-pc.Dlink ([106.51.188.78]) by smtp.gmail.com with ESMTPSA id c4-20020a170902c1c400b001c61e628e9dsm4301857plc.77.2023.11.09.19.52.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Nov 2023 19:53:01 -0800 (PST) From: Sunil V L To: linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Gregory Greenman , Kalle Valo , Palmer Dabbelt , Conor Dooley , Andrew Jones , Johannes Berg , Sunil V L , kernel test robot Subject: [PATCH v2] wifi: iwlwifi: Fix build warning when DMI is not enabled Date: Fri, 10 Nov 2023 09:22:55 +0530 Message-Id: <20231110035255.2925292-1-sunilvl@ventanamicro.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Fri, 10 Nov 2023 10:12:34 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1782201701357431610 X-GMAIL-MSGID: 1782201701357431610 This driver currently assumes CONFIG_DMI is enabled along with ACPI. This may not be true. Due to this, the kernel test bot reports new warning like below for RISC-V allyesconfig builds. >> drivers/net/wireless/intel/iwlwifi/fw/acpi.c:1190:25: warning: '%s' directive argument is null [-Wformat-overflow=] 1190 | "System vendor '%s' is not in the approved list, disabling PPAG.\n", Fix the warnings by printing "" when DMI interface returns NULL. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202311040602.sCjU3UXr-lkp@intel.com/ Signed-off-by: Sunil V L --- Changes since v1: 1) Modified the fix not to add dependency on DMI in Kconfig as per feedback from Johannes. drivers/net/wireless/intel/iwlwifi/fw/acpi.c | 2 +- drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c | 2 +- drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/fw/acpi.c b/drivers/net/wireless/intel/iwlwifi/fw/acpi.c index b96f30d11644..8cbb426f97e0 100644 --- a/drivers/net/wireless/intel/iwlwifi/fw/acpi.c +++ b/drivers/net/wireless/intel/iwlwifi/fw/acpi.c @@ -1273,7 +1273,7 @@ bool iwl_acpi_is_ppag_approved(struct iwl_fw_runtime *fwrt) if (!dmi_check_system(dmi_ppag_approved_list)) { IWL_DEBUG_RADIO(fwrt, "System vendor '%s' is not in the approved list, disabling PPAG.\n", - dmi_get_system_info(DMI_SYS_VENDOR)); + dmi_get_system_info(DMI_SYS_VENDOR) ?: ""); fwrt->ppag_flags = 0; return false; } diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c b/drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c index 329c545f65fd..e0c519daffe2 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c @@ -882,7 +882,7 @@ static ssize_t iwl_dbgfs_tas_get_status_read(struct file *file, le16_to_cpu(rsp->block_list[i])); pos += scnprintf(pos, endpos - pos, "\nOEM name: %s\n", - dmi_get_system_info(DMI_SYS_VENDOR)); + dmi_get_system_info(DMI_SYS_VENDOR) ?: ""); pos += scnprintf(pos, endpos - pos, "\tVendor In Approved List: %s\n", iwl_mvm_is_vendor_in_approved_list() ? "YES" : "NO"); pos += scnprintf(pos, endpos - pos, diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c index 403bd17b8b7a..c11ecb372dbc 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c @@ -1231,7 +1231,7 @@ static void iwl_mvm_tas_init(struct iwl_mvm *mvm) if (!iwl_mvm_is_vendor_in_approved_list()) { IWL_DEBUG_RADIO(mvm, "System vendor '%s' is not in the approved list, disabling TAS in US and Canada.\n", - dmi_get_system_info(DMI_SYS_VENDOR)); + dmi_get_system_info(DMI_SYS_VENDOR) ?: ""); if ((!iwl_mvm_add_to_tas_block_list(cmd.v4.block_list_array, &cmd.v4.block_list_size, IWL_TAS_US_MCC)) || @@ -1245,7 +1245,7 @@ static void iwl_mvm_tas_init(struct iwl_mvm *mvm) } else { IWL_DEBUG_RADIO(mvm, "System vendor '%s' is in the approved list.\n", - dmi_get_system_info(DMI_SYS_VENDOR)); + dmi_get_system_info(DMI_SYS_VENDOR) ?: ""); } /* v4 is the same size as v3, so no need to differentiate here */