Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp223018pxf; Thu, 11 Mar 2021 02:14:35 -0800 (PST) X-Google-Smtp-Source: ABdhPJy82NBfwtC7F/H9Vsj6GrNgPZ8njdwNhTjl8914rvSyO5aSGGDFt5aNw3ZOzLmTFLh0m/en X-Received: by 2002:a17:906:f10c:: with SMTP id gv12mr2338364ejb.53.1615457675215; Thu, 11 Mar 2021 02:14:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615457675; cv=none; d=google.com; s=arc-20160816; b=ydy2nx84f7NbPzk3Tlbo5yvzzeDRRwcxSfMpnbcLGVjPj0oWRZ+Knihwyx4kEHVm+a jfFbOcWAVQuprU7D/WgaLSCdxfqPB9M+kCYxNp8ToV8ZqJ4aVlRFw6IPv3oxStcH6edS TNEABTwgzPV1E1VwDszWBfrTJEJD+USEHYIG5aACtdTN9Fy38r5D9Hu6QLl+yzD23aLe BMWf63Xt+mYWGHaHSN4eRUKpxQhCj9YEVg/lSN8acDmzd5ctifVQABzvHq/GRCeiHZ9Q bjDx42Q4OsTpZEs3L0Yo+32stiF5YSGfCvFiUPfCNo+c6IE0iV/nsN7VA9SAPSpmkQSa DVdQ== 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=lGfXZwpPBr1bQchFpRwGljz2yEpa/kr8sLrLQZlZ7i0=; b=XiRRDwyzCrNsoolA8FogmuDMpdL+TV3aZ6XgEiHoKjD7d4sO73p14VSHYtScJERgnd DsrFSlRMEK1wq6MVHsXx1/85RyVGcakBI77Zd0vXdSCFoiMRuQZAk+PLSNYlh6ET7Q8P Fr3moyHqtm2wBxIZUpH6hKgNi1LtCKOmwn3gqm+jY3mLAZb31/Bw1Dvy5SoOsivwvZ9p 7BnC+x7JYeteCNaj/yY/4XytI3yoc+5FDGbO8gtbVKigYjK1c+8Anat+C85775kzKgSW UKqlgvDxt+pf7O+44JqVh2JaCbYjg4i7ak0Xif+rBm48HZI/7sLqcDjn8/dyYRmFfklf 6J1w== 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 dp18si1444424ejc.432.2021.03.11.02.14.11; Thu, 11 Mar 2021 02:14:35 -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 S232059AbhCKKMn (ORCPT + 99 others); Thu, 11 Mar 2021 05:12:43 -0500 Received: from out30-131.freemail.mail.aliyun.com ([115.124.30.131]:38373 "EHLO out30-131.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231639AbhCKKMa (ORCPT ); Thu, 11 Mar 2021 05:12:30 -0500 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R441e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04426;MF=jiapeng.chong@linux.alibaba.com;NM=1;PH=DS;RN=4;SR=0;TI=SMTPD_---0URS8awp_1615457537; Received: from j63c13417.sqa.eu95.tbsite.net(mailfrom:jiapeng.chong@linux.alibaba.com fp:SMTPD_---0URS8awp_1615457537) by smtp.aliyun-inc.com(127.0.0.1); Thu, 11 Mar 2021 18:12:28 +0800 From: Jiapeng Chong To: axboe@kernel.dk Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, Jiapeng Chong Subject: [PATCH] ataflop: fix warning comparing pointer to 0 Date: Thu, 11 Mar 2021 18:12:16 +0800 Message-Id: <1615457536-26368-1-git-send-email-jiapeng.chong@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 warning: ./drivers/block/ataflop.c:1440:20-21: WARNING comparing pointer to 0. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- drivers/block/ataflop.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/block/ataflop.c b/drivers/block/ataflop.c index 104b713f4..995374c 100644 --- a/drivers/block/ataflop.c +++ b/drivers/block/ataflop.c @@ -1436,8 +1436,7 @@ static int floppy_revalidate(struct gendisk *disk) unsigned int drive = p - unit; if (test_bit(drive, &changed_floppies) || - test_bit(drive, &fake_change) || - p->disktype == 0) { + test_bit(drive, &fake_change) || !p->disktype) { if (UD.flags & FTD_MSG) printk(KERN_ERR "floppy: clear format %p!\n", UDT); BufferDrive = -1; -- 1.8.3.1