Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp4411521pxy; Tue, 27 Apr 2021 04:35:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxSaR6vEPihQkKhkDk49j1HqVXIb06S4SqbPvIsaUKSf3z5WmXLvtDEF782T3CoJUABKROA X-Received: by 2002:a05:6402:354b:: with SMTP id f11mr3675583edd.361.1619523329255; Tue, 27 Apr 2021 04:35:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619523329; cv=none; d=google.com; s=arc-20160816; b=VROr3kjgVhQG3Ra+/Ikyw+//j+v2MqIdli8Y0iaGp2CW41lQWDnuTD3qQ3VXj/RoQ0 fFP8OJjTR2UZO2Bal5t/infWTppPNYZ1Xc4485x7nU+4ty4Bm4hPr5tLxqwKKNxRFFgj 8gDXf/3ZAncCNuxlI+BIrdaJoFT8CiGJ0cB+ARIguZnu21ubqLXNA3SLY4rkBW2DJpIs B5o632nwfPL6RRfYpt8vZ/Z5oDMUNqTM26M5uhaNJY3pnIDF38uAG5WRlX8nu8HyPNSB Ohx02sp//FcfYKC3xQNsLcubhniyGUdKLHf94Iu77BXn85z7cFVTviq+FB6/dsewYPup 0Xew== 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=ZX/Ipl8OwpYDGhlizeQe89IRkcvu88B3dIUgxx8XjVo=; b=SM81n8+EmqKhAFRj+5/E/f4AwSs0QbD/JXNXbZ9/HqY9sx/myy3GQcgHDEeUTpHZio dQaMNP63M89dYiqmFtOU5spZh5walBqy1DEklYXJHUZo81acL/ORT2RMH/q3tCN71TEF HXilrTrN+X6clS3k+O19Iq/WDYNu4L+MpHJ8tkTDfADQduJzGYmVauARRGdrrVTb/BW9 8ZpghTBAZDzsik1GtCv6lyr/496g1zUGsm4OAnw/1UOEebnVMaNF8q//TS2nSAkfMLxF lh4svKhgd14QYMHEigermgKMSeumXd3KzjQv7GA0+/eFhloOYXrtw/JpK3n6DCjKMydI A9/w== 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 hc7si15567792ejc.448.2021.04.27.04.35.05; Tue, 27 Apr 2021 04:35:29 -0700 (PDT) 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 S235882AbhD0Lcr (ORCPT + 99 others); Tue, 27 Apr 2021 07:32:47 -0400 Received: from out30-54.freemail.mail.aliyun.com ([115.124.30.54]:42230 "EHLO out30-54.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230270AbhD0Lcq (ORCPT ); Tue, 27 Apr 2021 07:32:46 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R291e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04423;MF=yang.lee@linux.alibaba.com;NM=1;PH=DS;RN=6;SR=0;TI=SMTPD_---0UX-4E.k_1619523121; Received: from j63c13417.sqa.eu95.tbsite.net(mailfrom:yang.lee@linux.alibaba.com fp:SMTPD_---0UX-4E.k_1619523121) by smtp.aliyun-inc.com(127.0.0.1); Tue, 27 Apr 2021 19:32:02 +0800 From: Yang Li To: stuart.w.hayes@gmail.com Cc: hdegoede@redhat.com, mgross@linux.intel.com, platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org, Yang Li Subject: [PATCH] platform/x86: drop unneeded assignment in host_control_smi() Date: Tue, 27 Apr 2021 19:31:59 +0800 Message-Id: <1619523119-112342-1-git-send-email-yang.lee@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Making '==' operation with ESM_STATUS_CMD_UNSUCCESSFUL directly after calling the function inb() is more efficient, so assignment to 'cmd_status' is redundant. Eliminate the following clang_analyzer warning: drivers/platform/x86/dell/dcdbas.c:397:11: warning: Although the value stored to 'cmd_status' is used in the enclosing expression, the value is never actually read from 'cmd_status' No functional change. Reported-by: Abaci Robot Signed-off-by: Yang Li --- drivers/platform/x86/dell/dcdbas.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/platform/x86/dell/dcdbas.c b/drivers/platform/x86/dell/dcdbas.c index d513a59..a9e8a88 100644 --- a/drivers/platform/x86/dell/dcdbas.c +++ b/drivers/platform/x86/dell/dcdbas.c @@ -394,7 +394,7 @@ static int host_control_smi(void) /* wait a few to see if it executed */ num_ticks = TIMEOUT_USEC_SHORT_SEMA_BLOCKING; - while ((cmd_status = inb(PCAT_APM_STATUS_PORT)) + while (inb(PCAT_APM_STATUS_PORT) == ESM_STATUS_CMD_UNSUCCESSFUL) { num_ticks--; if (num_ticks == EXPIRED_TIMER) -- 1.8.3.1