Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp6346545ybp; Tue, 15 Oct 2019 13:31:33 -0700 (PDT) X-Google-Smtp-Source: APXvYqzmnLMn9oc4GOTqPaV62FctDlX3RYihXzHrbSLCFffOEH1AJz40CyHGVGPvrDc3NwruD4j1 X-Received: by 2002:a17:906:b781:: with SMTP id dt1mr35829662ejb.221.1571171493274; Tue, 15 Oct 2019 13:31:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571171493; cv=none; d=google.com; s=arc-20160816; b=0ZuAsp031wDNg+t5nhUIsnVeVwcObbfeKk7kU6FZ9vtaSYN6B+Wj+XcKTZc1o3i2SC 4iQjmYn3qL4LE42fs+3HnBZWmaTkXP/rmUfXjTMv/glkoqb6jL4azW0dl/TZ3WBmYAiZ oCGdsfE1/2hMtz42052PW1Ep1piOVDdCFnf6jmHRZhCfUx69ABuoshP2RQA3DrWuYhhM CL0cfcVMLJyA/8SVfhmiUU+Sg3SND9yk05PBYjSQH/vh+ELeAWtWPgDZ0iaK70+k0kBg vs7jOqvocczmNBd8sVkHbyrDgNwUJi1pHUIGK3rwLI1qiKnfu7rrt5o6aW/FL2CdVXKB I9xQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=L5HOgkQMMJIihEae5ZZkONlPFc7mxHbtAiMOUbphoZo=; b=u14KItKPuL4jkxYULeD7LS5QjBP7+Edn6Y+XiOya2FtfveFWF97iwuhFhHqEaTeuZ5 XZF/xexx18PCNXIdO8Na7bRZNOokmsDEWC0dwq37BkHNp2uGEWpqyyFb6yYToMPYAMOP DiyjhpBJRGRyX6ZSubO5V3l1yy60KNGVWCRrJOJPUxmyDy8MPf3GDSqdob3F4Zox2LKB wpa+rBcjZ4Wia3A1BXH+dzDBHXl6fcsDJjOhwlCG2G2/TXBr1/WkpBQIo9xq9tPplbNZ MJ6MT4zcOEhfP1uRKB8UnnHJ0Ka4F9iAuVYPR9WGrK5OTl1CuFeF6vqJ+DFzKBtmwWQJ hD0g== 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 b17si13795897ejp.326.2019.10.15.13.31.10; Tue, 15 Oct 2019 13:31:33 -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 S2388226AbfJOQpZ (ORCPT + 99 others); Tue, 15 Oct 2019 12:45:25 -0400 Received: from mail-ot1-f67.google.com ([209.85.210.67]:38538 "EHLO mail-ot1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727643AbfJOQpZ (ORCPT ); Tue, 15 Oct 2019 12:45:25 -0400 Received: by mail-ot1-f67.google.com with SMTP id e11so17511119otl.5; Tue, 15 Oct 2019 09:45:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=L5HOgkQMMJIihEae5ZZkONlPFc7mxHbtAiMOUbphoZo=; b=lozZTxNh9+Us0oxQivH77G45cZ9qvm5VKPsmheR5LKUAWvUIW+uMQ6engak349+6K7 o7p69BPSStrxt8ru9b53S/K0kSmf3I6GdoCfQFQCOi20uT5UFqQ82KB8LJwRArja/YN4 lfZk2qqIqgjm4ijdi3udUbmDqiLcEdI7CvtPZV1uHp23OmKHpnlGcOfQiKQuL2hFQUY+ q7qpOWoV79xGcjxhKWPWzNuXcPqN+LZnCJGYDEKhgb8PoNF8RiV0lK02MHKez92C9LB8 DMiGRYhD3k9dlHHQmjE+w9DH1QpQD4RkpT/iEUaOQsBD7IChF3kMrjtWwDTQ0YaWILiX isHw== X-Gm-Message-State: APjAAAVHWVj4ZBDR/PFwM/BHUdMf59oXcqU+iTdJAQ6i2wqT8eyFmCzO yA9hJPqKrfU+ow1v7ZQHIsCaRCDmbDdFbuFowrKI2g== X-Received: by 2002:a05:6830:1544:: with SMTP id l4mr15309053otp.297.1571157924270; Tue, 15 Oct 2019 09:45:24 -0700 (PDT) MIME-Version: 1.0 References: <20191015155044.11858-1-ben.dooks@codethink.co.uk> In-Reply-To: <20191015155044.11858-1-ben.dooks@codethink.co.uk> From: Geert Uytterhoeven Date: Tue, 15 Oct 2019 18:45:13 +0200 Message-ID: Subject: Re: [PATCH] usb: renesas_usbhs: fix __le16 warnings To: "Ben Dooks (Codethink)" Cc: linux-kernel@lists.codethink.co.uk, Greg Kroah-Hartman , Yoshihiro Shimoda , Simon Horman , Geert Uytterhoeven , USB list , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 15, 2019 at 5:50 PM Ben Dooks (Codethink) wrote: > Fix the warnings generated by casting to/from __le16 without > using the correct functions. > > Fixes the following sparse warnings: > > drivers/usb/renesas_usbhs/common.c:165:25: warning: incorrect type in assignment (different base types) > drivers/usb/renesas_usbhs/common.c:165:25: expected restricted __le16 [usertype] wValue > drivers/usb/renesas_usbhs/common.c:165:25: got unsigned short > drivers/usb/renesas_usbhs/common.c:166:25: warning: incorrect type in assignment (different base types) > drivers/usb/renesas_usbhs/common.c:166:25: expected restricted __le16 [usertype] wIndex > drivers/usb/renesas_usbhs/common.c:166:25: got unsigned short > drivers/usb/renesas_usbhs/common.c:167:25: warning: incorrect type in assignment (different base types) > drivers/usb/renesas_usbhs/common.c:167:25: expected restricted __le16 [usertype] wLength > drivers/usb/renesas_usbhs/common.c:167:25: got unsigned short > drivers/usb/renesas_usbhs/common.c:173:39: warning: incorrect type in argument 3 (different base types) > drivers/usb/renesas_usbhs/common.c:173:39: expected unsigned short [usertype] data > drivers/usb/renesas_usbhs/common.c:173:39: got restricted __le16 [usertype] wValue > drivers/usb/renesas_usbhs/common.c:174:39: warning: incorrect type in argument 3 (different base types) > drivers/usb/renesas_usbhs/common.c:174:39: expected unsigned short [usertype] data > drivers/usb/renesas_usbhs/common.c:174:39: got restricted __le16 [usertype] wIndex > drivers/usb/renesas_usbhs/common.c:175:39: warning: incorrect type in argument 3 (different base types) > drivers/usb/renesas_usbhs/common.c:175:39: expected unsigned short [usertype] data > > Note. I belive this to be correct, and should be a no-op on arm. Yep, the affected platforms are little-endian. > Signed-off-by: Ben Dooks Reviewed-by: Geert Uytterhoeven Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds