From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from fout-b6-smtp.messagingengine.com (fout-b6-smtp.messagingengine.com [202.12.124.149]) (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 D16C158599F; Wed, 9 Sep 2026 15:26:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.12.124.149 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788967603; cv=none; b=l1LvASVV2R3O6RshGq72znQtPk9h0QkePUhBs1iNFwKv+atj1zPQZlcYjIwoNaPbV/r3y5Aau5PM2pWVNvPrjoRUXlFYUDfyTYquOsI+NqobTkMeuOJwEJrNx1B4Ndm7tiHvfyxmAMMMV+1phqIImjaBx1HCeSBpqfz1CrE57vY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788967603; c=relaxed/simple; bh=K+tPpcnxPlmZ+hTXPwaP9ZimJYGKFH4bAEXXpRkzTVc=; h=MIME-Version:Date:From:To:Cc:Message-Id:In-Reply-To:References: Subject:Content-Type; b=YrXoDvKZ3fyEa5NfqFPWCM+ODF55Vkly9NRgfLEwBTL1gmtHeqpGVGnAqwbrv9VdDQx3slJYes5pP3eAzztmI1POyZkkRlEd5s5iA/rsJCPwbg3SvU4Im+tF16QtPZB+3n6adMh7LIhty+j8MEu1LQExffIg1rhlXOSSa6Jd9BE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=squebb.ca; spf=pass smtp.mailfrom=squebb.ca; dkim=pass (2048-bit key) header.d=squebb.ca header.i=@squebb.ca header.b=jPUh/+lX; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=QR5qTOpO; arc=none smtp.client-ip=202.12.124.149 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=squebb.ca Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=squebb.ca Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=squebb.ca header.i=@squebb.ca header.b="jPUh/+lX"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="QR5qTOpO" Received: from stl-compute-04.internal (stl-compute-04.internal [10.204.2.64]) by mailfout.stl.internal (Postfix) with ESMTP id 0C79C1D0007D; Wed, 9 Sep 2026 11:26:40 -0400 (EDT) Received: from stl-imap-02 ([10.204.2.93]) by stl-compute-04.internal (MEProxy); Wed, 09 Sep 2026 11:26:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=squebb.ca; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm2; t=1788967600; x=1789054000; bh=ZPxVBLa4CvLLJKe83NmgL2WWM/qbgnI7dmZEJVlqqrU=; b= jPUh/+lXlWS7tgD1oT6DJXiZZlrMPPDh4Tfv3XGlQ6umMqHXfdboh/PLx07ghan8 4QwE62dAYUR1q6MzISA/cDbM4TegLJT62ZbbWH8zaFbb0V14YglZZKXlD6jXi17F REFDMPqNB7HCf/Sk15avPoWLdSGJ0Pxop9gM18KYf6W7LEeotJaTllglyrtaen2w lNZwl4W+g8KNjkWGdr7g3kTb2qn89TKaBGrJ9iUIDbqrvrVopVR20P0sKqWL4U5G re1LwBvJzQ6OMOHElksYq5Y0QqrkIVklIUXW6bcR4eSLkGHjE3frXwCPYDfiOfGB sg1X2cn2h3pd9oWIp9a3NQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1788967600; x= 1789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byzaCWjxDrwHGoqR0TjFwKb68SYEtEmiPcXMoRQCGEIaEgBcP1WJKvA X-ME-Proxy: Feedback-ID: ibe194615:Fastmail Received: by mailuser.stl.internal (Postfix, from userid 501) id 7EFDA2C00064; Wed, 9 Sep 2026 11:26:39 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ThreadId: AR8LNQcE3F07 Date: Wed, 09 Sep 2026 11:26:18 -0400 From: "Mark Pearson" To: "Thorsten Blum" , "Henrique de Moraes Holschuh" , "Derek J . Clark" , "Hans de Goede" , =?UTF-8?Q?Ilpo_J=C3=A4rvinen?= Cc: ibm-acpi-devel@lists.sourceforge.net, "platform-driver-x86@vger.kernel.org" , linux-kernel@vger.kernel.org Message-Id: <254d9c60-d21e-4ef5-b70e-89dd18ff7147@app.fastmail.com> In-Reply-To: <20260907090103.352995-3-blum@kernel.org> References: <20260907090103.352995-3-blum@kernel.org> Subject: Re: [PATCH] platform/x86: thinkpad_acpi: Remove unreachable code in beep_read() Content-Type: text/plain Content-Transfer-Encoding: 7bit Hi Thorsten, On Mon, Sep 7, 2026, at 5:01 AM, Thorsten Blum wrote: > The procfs entry /proc/acpi/ibm/beep is only created if beep_init() > succeeds, which requires beep_handle to be non-NULL. Remove the > unreachable code branch from beep_read(). > > Signed-off-by: Thorsten Blum > --- > drivers/platform/x86/lenovo/thinkpad_acpi.c | 8 ++------ > 1 file changed, 2 insertions(+), 6 deletions(-) > > diff --git a/drivers/platform/x86/lenovo/thinkpad_acpi.c > b/drivers/platform/x86/lenovo/thinkpad_acpi.c > index 1082c36ae723..069c9f1c359f 100644 > --- a/drivers/platform/x86/lenovo/thinkpad_acpi.c > +++ b/drivers/platform/x86/lenovo/thinkpad_acpi.c > @@ -5936,12 +5936,8 @@ static int __init beep_init(struct > ibm_init_struct *iibm) > > static int beep_read(struct seq_file *m) > { > - if (!beep_handle) > - seq_puts(m, "status:\t\tnot supported\n"); > - else { > - seq_puts(m, "status:\t\tsupported\n"); > - seq_puts(m, "commands:\t ( is 0-17)\n"); > - } > + seq_puts(m, "status:\t\tsupported\n"); > + seq_puts(m, "commands:\t ( is 0-17)\n"); > > return 0; > } Change looks good to me. I guess the beep_write could be similarly updated? Mark