Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp541931imm; Sat, 8 Sep 2018 04:11:32 -0700 (PDT) X-Google-Smtp-Source: ANB0VdY1u1Q2jzdulrdSiwCebqMG0bk9u4vZ/WM+Kb2YrqdeLM1BIKrN9RfZhPAh4YR4NWzvCox5 X-Received: by 2002:a17:902:8697:: with SMTP id g23-v6mr12465911plo.292.1536405092162; Sat, 08 Sep 2018 04:11:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536405092; cv=none; d=google.com; s=arc-20160816; b=aIWa54w4r8uR0nGzJyzHAS4Bqsco4LSQLwwa+wsMyMXHp096saMSexssq7rRkqjOjp Otk8G+fNjnfQuyLiNAYvSX1BR2rS+AsiLa/3yUM7STHxjtRVLJO9yNjdju8xMR9us0Ag YDaFRpahV1UQD5KS2RWaFuwTqfi6xGREQ4qe+dOllZRg/LI7vgLSedBNaJqDdt5CNfi9 OAzDx0YkUFmip6u7gwl6POiKw5UGZI1LaPNQjCsP5vh2I83eMGGVeoajmlvJ6jWaEtsa i1oPB+4+2f2CxEiI86YXvvpAzYqUB5lGL8/X0YXGglFhv13nM2sNA8h7chkPhI/gt+Ws vZYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=Av8Ob7v8jEy9Ayov7165GyRYbVtvdRTnG5Xi+ZTc4wQ=; b=hKQldrTsSc0tlvIEdNNl+QLwqTw+Dko9QfcbCvQDfU+EuIJZ4z4SP1GiIB3LxUFPFy G4bY9DhPGFETAoBrP5GB+RIAo4ynJLVfmbJpsskznUJxJirLJ8Tbs+TjvgLTyuJ0OWav lRvq5tF3Mi9jbLFWQLSpAycV6Y6CuN/ozP5mESmfrP+jhZZP1hRc6Okqi1EY91XGlKVK rDexQ7RM2WAoJ7OPFYGztmK+hNpnNjSiqqC8WmshqUtaKR2DD96Q9dMqyeJisoBBOutP mHo/7Wk830ZtuLonm9ZcmKaGIOGjkxZvKMHgwlkCO0M4vS1LLjEDQDpfdJY0NBnFg3t8 zt0A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u76-v6si12291017pfj.58.2018.09.08.04.11.17; Sat, 08 Sep 2018 04:11:32 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726632AbeIHPzS (ORCPT + 99 others); Sat, 8 Sep 2018 11:55:18 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:34853 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726315AbeIHPzS (ORCPT ); Sat, 8 Sep 2018 11:55:18 -0400 Received: from DGGEMS401-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id A5379964FB81F; Sat, 8 Sep 2018 19:09:50 +0800 (CST) Received: from linux-ibm.site (10.175.102.37) by DGGEMS401-HUB.china.huawei.com (10.3.19.201) with Microsoft SMTP Server id 14.3.399.0; Sat, 8 Sep 2018 19:09:47 +0800 From: zhong jiang To: CC: , , , , Subject: [PATCH] iio: remove unnecessary condition judgment in am2315_trigger_handler Date: Sat, 8 Sep 2018 18:57:36 +0800 Message-ID: <1536404256-25189-1-git-send-email-zhongjiang@huawei.com> X-Mailer: git-send-email 1.7.12.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.175.102.37] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The iterator in for_each_set_bit is never null, therefore, remove the redundant conditional judgment. Signed-off-by: zhong jiang --- drivers/iio/humidity/am2315.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/iio/humidity/am2315.c b/drivers/iio/humidity/am2315.c index 7d8669d..dc12e37 100644 --- a/drivers/iio/humidity/am2315.c +++ b/drivers/iio/humidity/am2315.c @@ -176,8 +176,7 @@ static irqreturn_t am2315_trigger_handler(int irq, void *p) i = 0; for_each_set_bit(bit, indio_dev->active_scan_mask, indio_dev->masklength) { - data->buffer[i] = (bit ? sensor_data.temp_data : - sensor_data.hum_data); + data->buffer[i] = sensor_data.temp_data; i++; } } -- 1.7.12.4