Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp16387pxb; Fri, 9 Apr 2021 16:44:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyD0oeTusuVO708JAjBr2XUwfhAyVyowpsbIi+pR/wFHyThjXz4pkk50zSXYpNvghgPl6iL X-Received: by 2002:a62:33c6:0:b029:225:5266:28df with SMTP id z189-20020a6233c60000b0290225526628dfmr14499419pfz.7.1618011856810; Fri, 09 Apr 2021 16:44:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618011856; cv=none; d=google.com; s=arc-20160816; b=xhQlcoBJz/VPQDARICdi/NTD9IYTqWDK17bFv6a1wlQ1VLylTbfQDrGynWkuzY5UHM KfohNAolYHQTuuYjewrG4aP0EiGRxvOrMQTANJhFYbNeES5CgHEYRec59GI9oeqjSoV7 xzPfdrKZ4vh//rodwJMFw29/gOL4j+L9ttlDYk9GpuaTlbMVbnjEdyxW1RaaLgzBy7Kl TQhQRIGXoGGHOApd3dffgvtEFQUF5ovyoI7Ps1ED15PEOtluEpZlexffaDgXY5U26xk+ L/CzVtNfWMb72aCz64YEI1zMsvYMqgea+11sXt/Oo86VdbwpTtOKj59Z6ZPXkMaouSwb t6vg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=itB/r/hBoTOXTc28lZNT+u1t0TPcb3x7r2ZTxlSn9lU=; b=SCT9PRAmVLPZ5E9q5pWa4ZHMtX3gC/IjsEX+UCe8HaNkaM5lSRCNFdCZkC4ZYViNiG XNjP8PooSEq4u1SonFKzq1ZV/v8bixzWhzEIS5eupuJqZ2n6csERRgwtSkI2C5fg8mqq 7xbCQaMqzpA0sye8WLa0vhoWBoOCC8W9YvIFNFpv2ht92oX+qodu837/VuanI9vZ2gz/ tXorJUk2hTJWWUp4acJpZymK3Goz+5jOP5/NI5+k10PuN8wRMARJ4wfldAeZx4s7jaWf O0X7w+pTbZ2uVKDdqmA8xME3ZookgwvYMkpabyl/2LtT3Y5XhAaQ4ntq6WOvXYmjuEUG Hwow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@163.com header.s=s110527 header.b=YNFLt+ha; 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=pass (p=NONE sp=NONE dis=NONE) header.from=163.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bf4si4625843plb.122.2021.04.09.16.44.03; Fri, 09 Apr 2021 16:44:16 -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; dkim=pass header.i=@163.com header.s=s110527 header.b=YNFLt+ha; 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=pass (p=NONE sp=NONE dis=NONE) header.from=163.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235185AbhDIXnq (ORCPT + 99 others); Fri, 9 Apr 2021 19:43:46 -0400 Received: from m12-18.163.com ([220.181.12.18]:53313 "EHLO m12-18.163.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235096AbhDIXnq (ORCPT ); Fri, 9 Apr 2021 19:43:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-Id:MIME-Version; bh=itB/r /hBoTOXTc28lZNT+u1t0TPcb3x7r2ZTxlSn9lU=; b=YNFLt+ha5YXnN4t/LZlvh +97cNHgvlTepSHiXOEtJ4ErE+dMbvPvTlmYeJxjqu0EI3Odut4bZDnnlTQ3u7FWI Pl4u1gx5cMPIWV5oeO6rKStGH8GTxcYjOMzXmOAePLdP+DXaYL39i0ckO9AaSV+H hzUoSMWOiopSLyjz8tf4bo= Received: from yangjunlin.ccdomain.com (unknown [218.17.89.92]) by smtp14 (Coremail) with SMTP id EsCowABnbeWc5nBguXVqdA--.36829S2; Sat, 10 Apr 2021 07:43:25 +0800 (CST) From: angkery To: axboe@kernel.dk Cc: linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org, Junlin Yang Subject: [PATCH v1] pata_ipx4xx_cf: Fix unsigned comparison with less than zero Date: Sat, 10 Apr 2021 07:42:42 +0800 Message-Id: <20210409234242.1979-1-angkery@163.com> X-Mailer: git-send-email 2.24.0.windows.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: EsCowABnbeWc5nBguXVqdA--.36829S2 X-Coremail-Antispam: 1Uf129KBjvJXoWrZF1kGr4rAryUAFWruw13twb_yoW8JrW8pF 47Cay8urWkXas0kw4kJr47ZF13J3Z5WrWIv3y3C3yavwn5Xr95JFySgFyjvF1qkrZ7Gr13 try5tr4UWFsrZF7anT9S1TB71UUUUU7qnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x07bUvtZUUUUU= X-Originating-IP: [218.17.89.92] X-CM-SenderInfo: 5dqjyvlu16il2tof0z/xtbBRh1vI13l-NlhUwAAs4 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Junlin Yang The return from the call to platform_get_irq() is int, it can be a negative error code, however this is being assigned to an unsigned int variable 'irq', so making 'irq' an int, and change the position to keep the code format. Fixes coccicheck warnings: ./drivers/ata/pata_ixp4xx_cf.c:168:5-8: WARNING: Unsigned expression compared with zero: irq > 0 Signed-off-by: Junlin Yang --- changes in v1: update the commit information. drivers/ata/pata_ixp4xx_cf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/ata/pata_ixp4xx_cf.c b/drivers/ata/pata_ixp4xx_cf.c index abc0e87..43215a4 100644 --- a/drivers/ata/pata_ixp4xx_cf.c +++ b/drivers/ata/pata_ixp4xx_cf.c @@ -135,12 +135,12 @@ static void ixp4xx_setup_port(struct ata_port *ap, static int ixp4xx_pata_probe(struct platform_device *pdev) { - unsigned int irq; struct resource *cs0, *cs1; struct ata_host *host; struct ata_port *ap; struct ixp4xx_pata_data *data = dev_get_platdata(&pdev->dev); int ret; + int irq; cs0 = platform_get_resource(pdev, IORESOURCE_MEM, 0); cs1 = platform_get_resource(pdev, IORESOURCE_MEM, 1); -- 1.9.1