Received: by 2002:a05:6359:6284:b0:131:369:b2a3 with SMTP id se4csp345973rwb; Fri, 4 Aug 2023 13:49:11 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEXJfhAnDSF8nHYycED2n93Qr0te+JC9WnWBuXFG6X4w51fjqi+3C1QFjzbSV5KK7N6xJVI X-Received: by 2002:a17:903:248:b0:1b1:99c9:8ce1 with SMTP id j8-20020a170903024800b001b199c98ce1mr2491712plh.51.1691182151591; Fri, 04 Aug 2023 13:49:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691182151; cv=none; d=google.com; s=arc-20160816; b=R/aFhqpmU437cm7OS1o7vpjoMAgIOEYDvut6UKjGgFfgzVzDs64abXFQRb7J6hje12 Gx6076Z2fsC45fBbgp5IHZFFoKF6w4CzHJtXYlRXvGjbxq1WYmYQ677tikO6gs61//VL YXBxjxmSTDHwW7sVWnVdNFd0CFnbJGmqZy7paCuT/ALKqhSjC8iT1Ojh+FFZOSYJbboA hOqJxIw+dgRLVqWQf04vuq1C0D/7tCCYYIiQjXwtgJJif/rFpKedOL4EzkeeRVICIUG1 9C3f3YjeM/gHDBytuq2rwFXsWKpJILG0XGLkMutdU1N7Zfu5DVbCLJ8AQQtc8uQknumm 1LLw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=TtS43VRN+wQ8hITEdXVbnPip0UGeJtnpKDCpHqfHLZ0=; fh=OnVXZR/xMlTDaO2l7yI2gI/v6kWP0ES896Di16+esTI=; b=v88y6s+h/dlPp7L6PNrx0oSa8DioliqpINJPGSJGgJOPXF7acpO351KPPW0Xm7+hkP Tlv7OMzoc0pLuOIsi6jPWmOzINyNGezDQE4Kjfek267t9wVYz3gOBpGNFVITuAYarzAh Fwupi3yC5l0sEyEMNSPqEI+Iu1pnZTIDbMSNJXYYtrmxgy5AqezZHfbZQV6dQikKq/hW 88LrU+CNyRJI6HbVPZgwEbdQjHe6CpF70PsvuU6hzue8D3x2PVieK91tm6YMvqrUpk5Y DE20JUvswn8i5Zem7A+0teQGlOlnOdAVGG1wm355UlMMrfq/j7CD0l/kivGG0wZbiQwp Svww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=qRShR6hI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q6-20020a17090311c600b001b9ed021929si2322802plh.225.2023.08.04.13.48.59; Fri, 04 Aug 2023 13:49:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=qRShR6hI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229934AbjHDUHX (ORCPT + 99 others); Fri, 4 Aug 2023 16:07:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36390 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229873AbjHDUHV (ORCPT ); Fri, 4 Aug 2023 16:07:21 -0400 Received: from mail-pj1-x1033.google.com (mail-pj1-x1033.google.com [IPv6:2607:f8b0:4864:20::1033]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 864C7E6E; Fri, 4 Aug 2023 13:07:20 -0700 (PDT) Received: by mail-pj1-x1033.google.com with SMTP id 98e67ed59e1d1-26929bf95b6so529082a91.3; Fri, 04 Aug 2023 13:07:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1691179640; x=1691784440; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=TtS43VRN+wQ8hITEdXVbnPip0UGeJtnpKDCpHqfHLZ0=; b=qRShR6hITtCBjV+oK0KgZCb+6sv+cl9TdFrYsKET2tthiuttb8IK2pDgViMHnXYsil 94QrwcteZ6XYPoXXNWkIIo7mjPZOFzWgrdfC0FAqW8CcHawAhI1MgSFsB9ocaGgYLjiG W2QR0btpWXuTaFkmRU+Ss3Jmrcc8LyTsG8BYRbTZ3nEFxJCvNkEpeGdKr7Bni+YqwSEK psu65ava9S9T3/yZBkLoZNEB/DBNUo8XZXzM1AGYhY4GKD0i/w/lLiZ5nR78O0PU9KxD aOfy/hfMj6TOQf6Kb1Dwiqd8OxcPDB3k1Oweh8yDrbm5s7kvxDCX9tVnDOglqWE+6/DN nwaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691179640; x=1691784440; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=TtS43VRN+wQ8hITEdXVbnPip0UGeJtnpKDCpHqfHLZ0=; b=NI1jhhybalD63Pad3aYyqgVej3EJt7l8CH5FLN8rZx1ayp9Svm4AtYi1tNlLlwb33s JKLLplyQuV1D5HZte8Ra0KqyiUmSSs6aGpOv0S+HmPEPVgFiA58BiGH45NP6xNsskQId NpHlVEqcT8XkwcNaZ4s1mOCw/eWZ2NXk5GaidikKk2ToJGeoqQE42jNLeJkJHd4eh5nF xjo0q59bi/nC3zTjvcGNxreHuUZZRZDLmZI7WPckk+CnBlkfXqZXjTNA4XoGkmKQDfnD mb0TDIYqYERLSNaumPjxIs2ySVZFC4eNY0+7c/hzgaPs+JKBfPSdxgbKsf0Y4dAPCWTR mbRw== X-Gm-Message-State: AOJu0YzfFIwduzidQcMZA9uTWiyCZPEVXFNqrJ/tHWqSCsCEEgtRmVKO CX4bqcZkKrO4obhlAb/EepQU2HBpmA0= X-Received: by 2002:a17:90b:889:b0:268:352c:9d13 with SMTP id bj9-20020a17090b088900b00268352c9d13mr2467096pjb.0.1691179639882; Fri, 04 Aug 2023 13:07:19 -0700 (PDT) Received: from localhost.localdomain ([2409:40c2:1056:ada3:1859:30f6:c95a:3e44]) by smtp.gmail.com with ESMTPSA id ge13-20020a17090b0e0d00b0024e4f169931sm4534070pjb.2.2023.08.04.13.07.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Aug 2023 13:07:19 -0700 (PDT) From: coolrrsh@gmail.com To: broonie@kernel.org, linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org Cc: linux-kernel-mentees@lists.linuxfoundation.org, Rajeshwar R Shinde Subject: [PATCH v2] fixes warning Date: Sat, 5 Aug 2023 01:37:11 +0530 Message-Id: <20230804200711.65750-2-coolrrsh@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230804200711.65750-1-coolrrsh@gmail.com> References: <20230804200711.65750-1-coolrrsh@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Rajeshwar R Shinde Typecasting the interrupt number from "unsigned int" to "signed int" to compare with 0(signed int by default). Declaring interrupt number as "signed int" would violate kernel standards. So typecasting is the possible approach. The fix is for spi-mpc52xx. This fixes warning such as: drivers/spi/spi-mpc52xx-psc.c:332:5-13: WARNING: Unsigned expression compared with zero: mps -> irq < 0 Signed-off-by: Rajeshwar R Shinde --- drivers/spi/spi-mpc52xx-psc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/spi/spi-mpc52xx-psc.c b/drivers/spi/spi-mpc52xx-psc.c index 9a1a080..7452bc9 100644 --- a/drivers/spi/spi-mpc52xx-psc.c +++ b/drivers/spi/spi-mpc52xx-psc.c @@ -329,7 +329,7 @@ static int mpc52xx_psc_spi_of_probe(struct platform_device *pdev) mps->fifo = ((void __iomem *)mps->psc) + sizeof(struct mpc52xx_psc); mps->irq = platform_get_irq(pdev, 0); - if (mps->irq < 0) + if ((int)mps->irq < 0) return mps->irq; ret = devm_request_irq(dev, mps->irq, mpc52xx_psc_spi_isr, 0, -- 2.25.1