From patchwork Mon May 1 23:17:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marijn Suijten X-Patchwork-Id: 89203 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp235828vqo; Mon, 1 May 2023 16:21:55 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7tCNjfH96xk7piL9ORzFnPdA6RBYzZgoLBisEMHeZG1qKEaoKnySMiVeV7CJeaAeRUImZc X-Received: by 2002:a17:90b:1a81:b0:247:78c0:125e with SMTP id ng1-20020a17090b1a8100b0024778c0125emr23498450pjb.15.1682983314880; Mon, 01 May 2023 16:21:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682983314; cv=none; d=google.com; s=arc-20160816; b=Q0DO+JMG+YFEkHlioQ3GsrLhDcRC+frSdxBsJii4rnHxMUtgF4pOu4OXl78yP6VBSI QiSAN7JF5+GpJJc9KwypjPcEf/1Eom8xjOQoBK4Pjo/qyQwTj7Ncq4t4M4JSsozXdnwG 5ksLws0N38Q7V27S1Xh+TVfP864vukJw2BTq5RhFjmaul1C1wUftY/K1L2acQmCuatCC 5I7Vl2OvTv+LPSNhJkRGpnsE8ofLGc7uqM/iKMgyfBbwwNlMXe+MNoOggroM4Xj81+79 7q+xVgvHGLYV0EAJSmky+gHMo0WA8kHiDpxmYszTlRNqmR8QLFB6HGj4Sx4AtBMngxou inaA== 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:date:subject:cc:to:from; bh=U69WzDTbasRtjjZkZVDNyC2omn4xzHevOy+KkkYwHCQ=; b=MSSVCe3OmMJRc1yfVobAjPYlT1cJSZdIrK1Hae10uRSRb2zkKfU8ymqEnSC0q6lAs2 fC/BEdA+7nxe7l01tKVrq8iajYZHIzvRyR0F/0/S6UjOwEWvQ+292vQSW1yEAxfVAqYV PJ3i9CcCvtJ2JLjgJslM2HV6to1+RnzH/NL6vvh9dcwdQidJqSR4ziC2Ub+owWwp5B6s mb08Y3NwwPS2yO5k1qaNKTASMVAroS88W8RYHOEJbdTxh/wxQ4HwszA9z0ROVagv6Xrt otcQgpjd5y507bE7SW9BTbPKWec6ncCZKwy76hHgiZsxHVdQf+i0xnX5otrb9Pn1gJ2d 1k3A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id rm2-20020a17090b3ec200b0024742007433si10436330pjb.19.2023.05.01.16.21.42; Mon, 01 May 2023 16:21:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232957AbjEAXSe (ORCPT + 99 others); Mon, 1 May 2023 19:18:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49896 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229653AbjEAXSX (ORCPT ); Mon, 1 May 2023 19:18:23 -0400 Received: from relay07.th.seeweb.it (relay07.th.seeweb.it [IPv6:2001:4b7a:2000:18::168]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AD1E235B8; Mon, 1 May 2023 16:18:19 -0700 (PDT) Received: from localhost.localdomain (94-211-6-86.cable.dynamic.v4.ziggo.nl [94.211.6.86]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by m-r2.th.seeweb.it (Postfix) with ESMTPSA id B7E5540E65; Tue, 2 May 2023 01:18:15 +0200 (CEST) From: Marijn Suijten To: phone-devel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, AngeloGioacchino Del Regno , Konrad Dybcio , Martin Botka , Jami Kettunen , Jonathan Cameron , Lars-Peter Clausen , Andy Gross , Bjorn Andersson Cc: Marijn Suijten , linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org Subject: [PATCH RESEND v3 4/5] iio: adc: qcom-spmi-adc5: Remove unnecessary datasheet_name NULL check Date: Tue, 2 May 2023 01:17:36 +0200 Message-Id: <20230502-iio-adc-propagate-fw-node-label-v3-4-6be5db6e6b5a@somainline.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230502-iio-adc-propagate-fw-node-label-v3-0-6be5db6e6b5a@somainline.org> References: <20230502-iio-adc-propagate-fw-node-label-v3-0-6be5db6e6b5a@somainline.org> MIME-Version: 1.0 X-Mailer: b4 0.12.2 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,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 lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1764735912307593334?= X-GMAIL-MSGID: =?utf-8?q?1764735912307593334?= datasheet_name is statically filled by a macro for every channel, and is nor should ever be set to NULL. Signed-off-by: Marijn Suijten Reviewed-by: Dmitry Baryshkov --- drivers/iio/adc/qcom-spmi-adc5.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/iio/adc/qcom-spmi-adc5.c b/drivers/iio/adc/qcom-spmi-adc5.c index fe2000209d97d..0a4fd3a461138 100644 --- a/drivers/iio/adc/qcom-spmi-adc5.c +++ b/drivers/iio/adc/qcom-spmi-adc5.c @@ -657,8 +657,7 @@ static int adc5_get_fw_channel_data(struct adc5_chip *adc, chan = chan & ADC_CHANNEL_MASK; } - if (chan > ADC5_PARALLEL_ISENSE_VBAT_IDATA || - !data->adc_chans[chan].datasheet_name) { + if (chan > ADC5_PARALLEL_ISENSE_VBAT_IDATA) { dev_err(dev, "%s invalid channel number %d\n", name, chan); return -EINVAL; }