Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp3403787rdb; Sun, 10 Dec 2023 04:37:18 -0800 (PST) X-Google-Smtp-Source: AGHT+IEEbxGbTZyHRzWaXzCr8e0K1TYbbN4JwqBoNsEUoPzB6aVvHC0QmkfokXTkOqejpYIHrqwv X-Received: by 2002:a9d:738b:0:b0:6d8:d28e:4834 with SMTP id j11-20020a9d738b000000b006d8d28e4834mr2868417otk.63.1702211838642; Sun, 10 Dec 2023 04:37:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702211838; cv=none; d=google.com; s=arc-20160816; b=X5+SXV3mTXK5XGMtG0hzNe3u+T42rEht9ZhHj11IoKL1r9QiJBBQla64IO1jnQC7z5 E5mugglVJ/c0c4GVIPOUAdETvFYFGgB9c35Sc6jrMFwV3JWUncwN04iAkaqSLDePRt8G sWevlaztVZYMAR2N0EV/+afexXAYetG7wLZC6eenB/I/H50IiQzwsNnO+DYVJFWs88Bm eRv+nmCIkYo7H9Q5WjNRL7/tV8LMA1B3dW62tRRfMcTawb5OjZbaUYCkBVR134B3Zk0A apoPZPCZ/3JyPk0nNdb7iEkajZiOM7rADjjLiM+peSFTnILdjXIujCdXgCOHnt++pTRB s4XQ== 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 :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=nxEMkV63krEUorpRHajv7jclDuOVUagkItoZhzV9qvg=; fh=vtMZGvu7Nq6clsJNoi6/hyjX6DQx62HWpv+mZNFHtZo=; b=FAPniE3zZ/Y/iYXvO13bTPZHCRweJF7X0DglhYFGstu2bFC21l3CMGPlTLWa4YM4Rh T6zbsw7o4L1vFA2JxwrkQQGK58fuGVXDHE6jy3Fl/oNKdpZCn6Mm4n2RWr8OC4zwIXzz rH0PBKY/9NudjgnxM3DCmnQqI4Ea3EKz2Dk6P1sq+7PucPk5/1aQzb/b1EKsFDTMgThF zx+zab96ujFEyvZvMlQXOPXc5xxe40VZR76bZozcy9yq9jNbx9IBh5fXTybN4fxja8KW K4KW6kUw5do7fUSu7yNOtLIN8FCVHqyWU15vO/p/UmFm9sCjcs3v/PtQLOeOUDPl2Xa/ xvKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=siLUPEh+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id m188-20020a6326c5000000b005c604ef1844si4446639pgm.3.2023.12.10.04.37.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 10 Dec 2023 04:37:18 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=siLUPEh+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 3B015808EEE7; Sun, 10 Dec 2023 04:37:16 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229518AbjLJMhE (ORCPT + 99 others); Sun, 10 Dec 2023 07:37:04 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41482 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229482AbjLJMhD (ORCPT ); Sun, 10 Dec 2023 07:37:03 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 435BC102 for ; Sun, 10 Dec 2023 04:37:09 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 77346C433C7; Sun, 10 Dec 2023 12:37:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1702211828; bh=pRBeoq0i5wdIAoj64UnUDaiei1SKdwmcYgCs6WKw67s=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=siLUPEh+g1d5hTqWbpQ0jYVZKFMXNeYUvAuGg3f2A+aw5FOgAZC3Amtf2qDAs+0KG nFMQPcMPCTNO3VcNjFpN2jCrdOdoe0SQ3gM3Gtjwmv/6o/HSOLy4R0k0pb797cxNw1 Hh/kEaGHPy3XBDS5TPGIZD6iYKnizqVf3dnpMS/8rs16B3QFN73H+adkpY1j7rcveu xDaWJwggp9s/o3SA93bwdwu9xSrAzUXgXVntANdVvjvwf5+HUyOU1Vh+PEh/Sa26p8 QnC73fxI0JHIc47R4ifPdP8WX4jHnla/8z3gGINU6jGKYRjne656/ZGyAsgJcayZ/P 053jZCyjbaPQQ== Date: Sun, 10 Dec 2023 12:37:04 +0000 From: Jonathan Cameron To: Jiapeng Chong Cc: lars@metafoo.de, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, Abaci Robot Subject: Re: [PATCH] iio: light: isl76682: remove unreachable code Message-ID: <20231210123704.4be7087e@jic23-huawei> In-Reply-To: <20231208021715.32450-1-jiapeng.chong@linux.alibaba.com> References: <20231208021715.32450-1-jiapeng.chong@linux.alibaba.com> X-Mailer: Claws Mail 4.2.0 (GTK 3.24.38; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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 fry.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 (fry.vger.email [0.0.0.0]); Sun, 10 Dec 2023 04:37:16 -0800 (PST) On Fri, 8 Dec 2023 10:17:15 +0800 Jiapeng Chong wrote: > The function isl76682_read_raw cannot execute return -EINVAL up to 145 > lines, delete the invalid code. > > drivers/iio/light/isl76682.c:145 isl76682_read_raw() warn: ignoring unreachable code. > > Reported-by: Abaci Robot > Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=7698 > Signed-off-by: Jiapeng Chong Applied. Thanks, Jonathan > --- > drivers/iio/light/isl76682.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/drivers/iio/light/isl76682.c b/drivers/iio/light/isl76682.c > index 0a7c3b09c3c0..cf6ddee44ffc 100644 > --- a/drivers/iio/light/isl76682.c > +++ b/drivers/iio/light/isl76682.c > @@ -142,7 +142,6 @@ static int isl76682_read_raw(struct iio_dev *indio_dev, > default: > return -EINVAL; > } > - return -EINVAL; > case IIO_CHAN_INFO_SCALE: > for (i = 0; i < ARRAY_SIZE(isl76682_range_table); i++) { > if (chip->range != isl76682_range_table[i].range)