Received: by 2002:ac0:950c:0:0:0:0:0 with SMTP id f12csp3308687imc; Wed, 13 Mar 2019 14:27:20 -0700 (PDT) X-Google-Smtp-Source: APXvYqw8pdvgJCT82C2u3kb9S/Bn6GfKmGNtQ0cCNpMHRZdpa3k+3tw+fijTTqYbcdPw/RkhWSXy X-Received: by 2002:a65:6299:: with SMTP id f25mr13275860pgv.376.1552512440264; Wed, 13 Mar 2019 14:27:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552512440; cv=none; d=google.com; s=arc-20160816; b=LAi2hzw1nbhRJlpSkmgfq9lZnJap0Pa84BF2QXMgx7j4KTvkaNpaW0Q8IqN1+cdLmj LMLr7VMptgo0YpUGs7O/vAsYr39z+IPGYZsdHtSFWmpJC2LoCLTRLbo87jGhtZgE0BGm PfWhnB8hZpFYyLrCkv5QPL+M8zi6OtAv7iyoZH9yHLkLPmF8VNM1aXyFc4wbarxQG2XT 17zfOrWO//oKfrsM1IQcpKCp6fb5LChX1oQDdeuroen1qq8/j1gt4wkxMiVxNuLpdC6s 91WPsbMGvVN1drg6z1GbH19+TS0l3HD/ayNOj7e0jpbrqpB9VZhqoNAnplR7qfLNnN5O YJJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=wHqBCGZBqTslHP0FVkHpdooZeIy06vctpru0uDS3ihQ=; b=I0+5BikdE0Yfahw/4SnnGSc39LIERfXksltd3h3V60wpoWxs9vvcuMHT+sOZ57Ouy5 NApD/tXoUvoZpeRilThQN++UcDGZe2t/P3SxbuETiNBWcI4sj3+5D24w5tsAcC7tKUf8 QJg2RfeOT9bkdCyEAAU6keR4AaPiyl+IdZXvtEGTsyJhIOT7LVT0WWYv0feflFenFYY7 eFsK4zuYME1LsRQWiSW9DMzxTEPuvDRMjJnZ59/AauQMbGBnDlKuK+yDafQjZZfz+Ptj wYn8jxlTfLEes/xzNgwIVbrDBfT8FMlzCl0YUfJETyvtMP5bvGH9uNkQSvZ33lkWFFVr W4qw== 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 v7si6183708pgq.125.2019.03.13.14.27.03; Wed, 13 Mar 2019 14:27:20 -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 S1727518AbfCMVYo (ORCPT + 99 others); Wed, 13 Mar 2019 17:24:44 -0400 Received: from mout.kundenserver.de ([217.72.192.73]:42145 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726125AbfCMVYo (ORCPT ); Wed, 13 Mar 2019 17:24:44 -0400 Received: from wuerfel.lan ([109.192.41.194]) by mrelayeu.kundenserver.de (mreue107 [212.227.15.145]) with ESMTPA (Nemesis) id 1McYP5-1gTl3Z2Q4z-00cynt; Wed, 13 Mar 2019 22:14:36 +0100 From: Arnd Bergmann To: Jiri Kosina , Jens Axboe Cc: Arnd Bergmann , Omar Sandoval , Hannes Reinecke , linux-block@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] floppy: fix harmless clang build warning Date: Wed, 13 Mar 2019 22:11:02 +0100 Message-Id: <20190313211433.4178148-1-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K1:Gg1ro3XTPV2CCnela4QdedSa5uOGKvbolUT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: X-Mailing-List: linux-kernel@vger.kernel.org clang warns about unusual code in floppy.c that looks like it was intended to be a bit mask operation, checking for a specific bit in the UDP->cmos variable (FLOPPY1_TYPE expands to '4' on ARM): drivers/block/floppy.c:3902:17: error: use of logical '&&' with constant operand [-Werror,-Wconstant-logical-operand] if (!UDP->cmos && FLOPPY1_TYPE) ^ ~~~~~~~~~~~~ drivers/block/floppy.c:3902:17: note: use '&' for a bitwise operation if (!UDP->cmos && FLOPPY1_TYPE) The check here is redundant anyway, if FLOPPY1_TYPE is zero, then assigning it to a zero UDP->cmos field does not change anything, so removing the extra check here has no effect other than shutting up the warning. Signed-off-by: Arnd Bergmann --- drivers/block/floppy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c index 95f608d1a098..56815446ed85 100644 --- a/drivers/block/floppy.c +++ b/drivers/block/floppy.c @@ -3899,7 +3899,7 @@ static void __init config_types(void) if (!UDP->cmos) UDP->cmos = FLOPPY0_TYPE; drive = 1; - if (!UDP->cmos && FLOPPY1_TYPE) + if (!UDP->cmos) UDP->cmos = FLOPPY1_TYPE; /* FIXME: additional physical CMOS drive detection should go here */ -- 2.20.0