Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp4387081pxb; Tue, 26 Jan 2021 21:55:29 -0800 (PST) X-Google-Smtp-Source: ABdhPJxQX5GaDbskrBRXnieiozW0HnQmq0bICvJiYueFnNvgPUNqBaKqrm3Kc9L0/2nRoCqVKYf8 X-Received: by 2002:a05:6402:1648:: with SMTP id s8mr7551755edx.50.1611726929712; Tue, 26 Jan 2021 21:55:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611726929; cv=none; d=google.com; s=arc-20160816; b=cg3UhK3IqpRTQB2fWpTBU00iouKfdzYaWLmyed/N+a+ZuQHWqmqJevJ4TOXRlMXFCd sQVvifSb2yjTXcqQdodH2uqaRmpQYCADcO0ZgAJt8FUFHFP+0O0qDQXWFO5oAsjRB5Lx VVyGEx5RQOSukFE0msDaoUF6AUTjFoKOr582WpmlezxMzMVeT2wydHDMKYp5MHlody+2 bmzUgg5+aKYlvG+iSeaY6+FgxjTP8eWdfq630HjtmWCn3t+uWXbCoCTWOAai6IGRIJ+o KsfHyockjk/i39dT/QaJrekL8JFcfVRpkZK4AFCG3WsMQjpAFxvmAHZrNtXeJBBE23gi ECtw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=NC36/yqI1eyHrQdy1CNW5+2nOqYRuvjl+rX7xDrQS1A=; b=I21jK+d3s8xcUpjZ9sg1CvShhgALPDYaavQIHgwGqke4txgZ9Ca02uwMBTsrJZy1ef hP2C6bdQ7bKSWEI+6UZPWhBfmbQS2052t3KgZnabir69jr4sVd8ZZbjDXm/K5lE+Yzdn PIGF2dZjgtdCzazIMVoKRuQ+oma8mpZ4WxL8ouUwQTXGdN+J6LUDx1EO6kvfiQrh6pSh TcxuqAMaHCIK7UAryiprJaq84G4PSWRKuD20QvH6M9Xy1z9sNRonaSfoJpMI0O+QuZXR mmgGNC+5D8vVrTzb+vjUgLxbUbSUArC+LkButY9WbsDEwNEo5A5ZGHIscpXizB5A0mZA /hXg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y38si488703ede.59.2021.01.26.21.54.58; Tue, 26 Jan 2021 21:55:29 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732465AbhAZRW3 (ORCPT + 99 others); Tue, 26 Jan 2021 12:22:29 -0500 Received: from out30-131.freemail.mail.aliyun.com ([115.124.30.131]:49758 "EHLO out30-131.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389169AbhAZGyU (ORCPT ); Tue, 26 Jan 2021 01:54:20 -0500 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R631e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04420;MF=abaci-bugfix@linux.alibaba.com;NM=1;PH=DS;RN=3;SR=0;TI=SMTPD_---0UMxYBbZ_1611644013; Received: from j63c13417.sqa.eu95.tbsite.net(mailfrom:abaci-bugfix@linux.alibaba.com fp:SMTPD_---0UMxYBbZ_1611644013) by smtp.aliyun-inc.com(127.0.0.1); Tue, 26 Jan 2021 14:53:36 +0800 From: Jiapeng Zhong To: tiwai@suse.de Cc: linux-kernel@vger.kernel.org, Jiapeng Zhong Subject: [PATCH] edd: Simplify the calculation of variables Date: Tue, 26 Jan 2021 14:53:31 +0800 Message-Id: <1611644011-60253-1-git-send-email-abaci-bugfix@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fix the following coccicheck warnings: ./drivers/firmware/edd.c:698:18-20: WARNING !A || A && B is equivalent to !A || B. Reported-by: Abaci Robot Signed-off-by: Jiapeng Zhong --- drivers/firmware/edd.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/firmware/edd.c b/drivers/firmware/edd.c index 14d0970..e8b409e 100644 --- a/drivers/firmware/edd.c +++ b/drivers/firmware/edd.c @@ -694,8 +694,7 @@ static void edd_populate_dir(struct edd_device * edev) int i; for (i = 0; (attr = edd_attrs[i]) && !error; i++) { - if (!attr->test || - (attr->test && attr->test(edev))) + if (!attr->test || attr->test(edev)) error = sysfs_create_file(&edev->kobj,&attr->attr); } -- 1.8.3.1