From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6C753C433F5 for ; Sat, 13 Nov 2021 20:06:52 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2D92861163 for ; Sat, 13 Nov 2021 20:06:52 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 2D92861163 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Subject:Cc:To: From:Date:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=BlVNTHiyjHwDEZ7L1RJ24bG02C4dFl5HsmpKbJFjHeo=; b=0/Z+C7j7wODVjj 6JwnQm0QedyYFyF5aGzkmXzo81jjU9JRZYdgXOikI4sp/5sULFXmwEYiExLOmVj0FpBf7QzYCn4mA 3TDOaBRuGlfr2QgiNoosm0LJVYrx0Ro0M6iP/9r8L6o6Y2oZU6F9BQDf/wRDEVsEhChjDyxcJRiSp gbFHJVCIPA4w80ZzZ1ElJDRBVHiUHiH8RoHV1tM0RBiPEBvsRQoVXD0NgfP/P2aVeYN9Lr0jpq8ak ROF9ubEAcDfuozgNJJVvqP5cJzSInM1kEozGfdjn1PxPakRPqxeSaJPE71wpsuoZPKw7d6qXgksBN fc6l6EqkI/PdIM5ZkssA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mlzGl-00D2Pu-0A; Sat, 13 Nov 2021 20:04:59 +0000 Received: from mail-pl1-x62e.google.com ([2607:f8b0:4864:20::62e]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mlzGe-00D2P7-G4 for linux-arm-kernel@lists.infradead.org; Sat, 13 Nov 2021 20:04:55 +0000 Received: by mail-pl1-x62e.google.com with SMTP id p18so11087568plf.13 for ; Sat, 13 Nov 2021 12:04:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:mime-version:content-disposition; bh=Tb74LrSzA8PWHlBbQ2QqZoirlUR2jOkJqwuP2JlwP2g=; b=fr2NExjejAaBCjGfUF1PZQ/UEzdEpY12IHDphNFvVXzELU5LQT1rXxsc8B/Wez8kQN JVBQGc+eK8ziRSxV0q8O2uai0W85hXj9z6rHl/XQ0bslcahVWRu5jqGBUhR9SJZSPMmN 86XY4kIhxoWcEQ6BEdwrlJ5i0MMpORjzjR8Is7mmInx1KRsqus4Ccr7b64/Cc/xO8pu7 8wtTXypOWY1epP+DVM8wsqJRgCVAT2P3nCJoH89TfZ758E3ALc/XawdLvAKkcdJp3HWO 4G818aaD2Zx0AdhP6zp/OfHEAjDA2bkBagfAFsCvwzxfSFtnCbqKqupq/Ceeu2V7TjYa Rgsw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition; bh=Tb74LrSzA8PWHlBbQ2QqZoirlUR2jOkJqwuP2JlwP2g=; b=nZBAL5egY6jI1cAipQMLQqrmeIsDVqLJeJfRsqhT3UdmSeAr4cYEjCInAQ8yHlKk1H nwKNAr2S7Z9a50EL51AJ9U1YraSXmb6c1zFkMbEpN23GtroOOhVoTIU4IDUzyFfOa6Ou 5OGPus8gGe7RFIGaA5gzlzEJsUPNPXMlygw2gO/wLL+vdDKE/m+wvQ425puB4hY+N305 ngeL8MbKtZdlvA11AXurLsrKjLw/O97+x7SFWsHck8vGankeAszAgugTa/XlW4y8wjop hbDu5ONTDGENsVKzzkOnCENjGZOglJPiemP9S5CqD00csSMjEF8pSb8MarxbShZszT5E pt1A== X-Gm-Message-State: AOAM531dyU8DES70OzsW3fV59+CUXOcTZsW7bmP1xLF8SWtyRfqYyQ7B JI+EAV7kC46kQjxnesLVZdnFZZ0ECEI= X-Google-Smtp-Source: ABdhPJxSzOFn3lMaparm0oRAqDqKpnDPf90DElYcRINmAqDZtXL6YFmz0+o+lMheasGAXbtcHJHfeQ== X-Received: by 2002:a17:902:e8d4:b0:143:88c2:e2c9 with SMTP id v20-20020a170902e8d400b0014388c2e2c9mr20246258plg.12.1636833890966; Sat, 13 Nov 2021 12:04:50 -0800 (PST) Received: from makvihas ([103.85.9.85]) by smtp.gmail.com with ESMTPSA id h23sm9988328pfn.109.2021.11.13.12.04.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 13 Nov 2021 12:04:50 -0800 (PST) Date: Sun, 14 Nov 2021 01:34:48 +0530 From: Vihas Mak To: jikos@kernel.org Cc: benjamin.tissoires@redhat.com, mcoquelin.stm32@gmail.com, alexandre.torgue@foss.st.com, linux-input@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] HID: thrustmaster: fix sparse warnings Message-ID: <20211113200448.GA1111164@makvihas> MIME-Version: 1.0 Content-Disposition: inline X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211113_120452_561735_213A1C8E X-CRM114-Status: GOOD ( 12.15 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Changed 0 to NULL to fix following sparse warnings: drivers/hid/hid-thrustmaster.c:208:43: warning: Using plain integer as NULL pointer drivers/hid/hid-thrustmaster.c:241:17: warning: Using plain integer as NULL pointer drivers/hid/hid-thrustmaster.c:275:37: warning: Using plain integer as NULL pointer Signed-off-by: Vihas Mak --- drivers/hid/hid-thrustmaster.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/hid/hid-thrustmaster.c b/drivers/hid/hid-thrustmaster.c index d44550aa8..3a5333424 100644 --- a/drivers/hid/hid-thrustmaster.c +++ b/drivers/hid/hid-thrustmaster.c @@ -205,7 +205,7 @@ static void thrustmaster_model_handler(struct urb *urb) struct tm_wheel *tm_wheel = hid_get_drvdata(hdev); uint16_t model = 0; int i, ret; - const struct tm_wheel_info *twi = 0; + const struct tm_wheel_info *twi = NULL; if (urb->status) { hid_err(hdev, "URB to get model id failed with error %d\n", urb->status); @@ -238,7 +238,7 @@ static void thrustmaster_model_handler(struct urb *urb) tm_wheel->usb_dev, usb_sndctrlpipe(tm_wheel->usb_dev, 0), (char *)tm_wheel->change_request, - 0, 0, // We do not expect any response from the wheel + NULL, 0, // We do not expect any response from the wheel thrustmaster_change_handler, hdev ); @@ -272,7 +272,7 @@ static void thrustmaster_remove(struct hid_device *hdev) static int thrustmaster_probe(struct hid_device *hdev, const struct hid_device_id *id) { int ret = 0; - struct tm_wheel *tm_wheel = 0; + struct tm_wheel *tm_wheel = NULL; ret = hid_parse(hdev); if (ret) { -- 2.25.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel