From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-179.mta0.migadu.com (out-179.mta0.migadu.com [91.218.175.179]) (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 B889335F602 for ; Sun, 26 Jul 2026 09:43:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.179 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785059001; cv=none; b=E+NeWO4aouz3x8NIDJJcx6S86LRc+crDBskXUZVQaM0vqPMYSql5eMD8BVCZ7cGW/eUVlz14ngDuRNpO8S/DLLaJJ1MMwKCwqTZF7qBCHkiazF2hVUFb/VmAE7FApUnzVuR8n7WQAQA6b1irQKHFHgFKtlw03mTZedngDdKCY1E= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785059001; c=relaxed/simple; bh=+28w8JULoIxCnVGDuqpEA2z2hoQKFvEf+nNosl1Ye+U=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=E1RHFVwoW1Yw32hCdacwfnezcCzQpqmoETo53F7Y9U9nk1pqD7wwQ7e8IRAs+nf9wALzASMYHSeQQ3YHMV/wmoKeUJzqDgk/WR26ApLfbj1JAqhegDMSVCSjNaeZyb1szPDDHxSETUNYtxhdqiWx1xSULhRecGIHELF5+/HLAAE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=GYJ7pDU0; arc=none smtp.client-ip=91.218.175.179 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="GYJ7pDU0" Message-ID: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1785058996; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=+28w8JULoIxCnVGDuqpEA2z2hoQKFvEf+nNosl1Ye+U=; b=GYJ7pDU0rv0zrWD9J6EjZjLH/USJGAeJWw9+HOr/LheobIfDunOshjUsggFlWhps8vqPmM 0olma5PGPWk+U4XLw7AyOtvFXJesYNRjcrvaOK9AyN8it7PGbJfDM+opCgIpOVrHdFm9kC dWg2QlOHqiqkBSsAkKgBaGThbZKfRHM= Subject: Re: [PATCH] iio: pressure: abp2030pa: Remove unreachable return in abp2_read_raw() X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Siratul Islam To: Babanpreet Singh , Jonathan Cameron , Petre Rodan Cc: David Lechner , Nuno =?ISO-8859-1?Q?S=E1?= , Andy Shevchenko , linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Date: Sun, 26 Jul 2026 15:42:55 +0600 In-Reply-To: <20260726072234.7-1-bbnpreetsingh@gmail.com> References: <20260726072234.7-1-bbnpreetsingh@gmail.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Migadu-Flow: FLOW_OUT On Sun, 2026-07-26 at 07:22 +0000, Babanpreet Singh wrote: > In the IIO_CHAN_INFO_RAW case every arm of the inner switch on > channel->type returns - IIO_PRESSURE and IIO_TEMP return IIO_VAL_INT and > default returns -EINVAL - so the "return IIO_VAL_INT;" following that > switch cannot be reached. The sibling IIO_CHAN_INFO_SCALE and > IIO_CHAN_INFO_OFFSET cases have the same shape and no trailing return, > so drop it here as well. >=20 > Found by smatch: > drivers/iio/pressure/abp2030pa.c:382 abp2_read_raw() warn: ignoring unrea= chable code. >=20 > No functional change: the compiler already discarded the statement, and > the generated object code is identical before and after. >=20 > Assisted-by: Claude:claude-opus-5 > Signed-off-by: Babanpreet Singh > --- >=20 LGTM. Reviewed-by: Siratul Islam -- Best regards, Sirat