Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 628993C276E; Tue, 21 Jul 2026 17:30:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784655038; cv=none; b=r8+DzwajZqYfkVpLPM5dL2l670kklnRy35UNusjvVLvboTAAdZoh1M3029ZtK0PwBVHAQT/y5gfsvEGsjZfN31R3OyHRwjqfUk8CyQxcJ9ZxBnFd/V/XezYxEEUOltMTYo+0HHy5ydFlHJWNrfVj89dQwok7lfBG+qLendQg2qA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784655038; c=relaxed/simple; bh=tl4BoRsvJRQm0AODN+BN9QjJ3MNRyYRwnnEzOQLX6jU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Ywk39hgDYGfvPvbkgMCjazn1uRfDoj6+q/fSCfh4w8sU9AFcH3FA1hDqFZ9ScgQiInpL7J9pNjaGotvElfxoYLlofwNvln/Ws9o/ctdIB4wnZKqwa0Zq6J5BqmJ0QF3TTiStqhon7sVsxQV8BmKfVYvSDOHRwtQKB1MJOvbvskk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=tYM55y3l; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="tYM55y3l" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8E7631F00A3E; Tue, 21 Jul 2026 17:30:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1784655037; bh=bU2rP9Ecauzby/feK09oOE59V/LybelplZun5bJDCoQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=tYM55y3lW+xLiG0UnSAOEdxzwAN+j1q/I+++zBz0FHWyFkwvp/Xoa0ynPJfeO9gTE KOe4eWgCAOydRl+u5KBSYOa/vTXXpMOEDo+/HjogODL5bP89T79hy9rJzTwnbW1lkf 150Gi9HHxzyoFtnFNA86F9CJpU8/iVgRqrU+EFsU= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, kernel test robot , =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= , Daniel Gibson Subject: [PATCH 7.1 1930/2077] platform/x86/amd/pmc: Avoid logging "(null)" for DMI values Date: Tue, 21 Jul 2026 17:26:43 +0200 Message-ID: <20260721152638.232019502@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260721152552.646164743@linuxfoundation.org> References: <20260721152552.646164743@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 7.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: Daniel Gibson commit a0738abd042f7406edd2175a819cf2e66388ed97 upstream. dmi_get_system_info(...) can return NULL. Using that as %s arguments of dev_info() would log "(null)" (as part of a message like '... System Vendor: "(null)", Product Name: "(null)" ...'), which may be confusing for users. Use Elvis operator to print "(Unknown)" instead. Fixes: 428b9fd2dce5 ("platform/x86/amd/pmc: Add delay_suspend module parameter") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202606251540.Nr2BtaNu-lkp@intel.com/ Suggested-by: Ilpo Järvinen Signed-off-by: Daniel Gibson Link: https://patch.msgid.link/20260626220210.1761783-2-daniel@gibson.sh Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen Signed-off-by: Greg Kroah-Hartman --- drivers/platform/x86/amd/pmc/pmc.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) --- a/drivers/platform/x86/amd/pmc/pmc.c +++ b/drivers/platform/x86/amd/pmc/pmc.c @@ -660,11 +660,11 @@ static bool amd_pmc_want_suspend_delay(s } else if (delay_suspend == 1) { if (!intermediate_wakeup) dev_info(pdev->dev, "Delaying suspend by 2.5s because delay_suspend=1. If this solves problems on your machine, please report this whole line to: platform-driver-x86@vger.kernel.org so it can be automatically detected as affected in the future. System Vendor: \"%s\" Product Name: \"%s\" Product Family: \"%s\" Board Vendor: \"%s\" Board Name: \"%s\"\n", - dmi_get_system_info(DMI_SYS_VENDOR), - dmi_get_system_info(DMI_PRODUCT_NAME), - dmi_get_system_info(DMI_PRODUCT_FAMILY), - dmi_get_system_info(DMI_BOARD_VENDOR), - dmi_get_system_info(DMI_BOARD_NAME)); + dmi_get_system_info(DMI_SYS_VENDOR) ?: "(Unknown)", + dmi_get_system_info(DMI_PRODUCT_NAME) ?: "(Unknown)", + dmi_get_system_info(DMI_PRODUCT_FAMILY) ?: "(Unknown)", + dmi_get_system_info(DMI_BOARD_VENDOR) ?: "(Unknown)", + dmi_get_system_info(DMI_BOARD_NAME) ?: "(Unknown)"); return true; } return false;