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 X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 06C00ECE588 for ; Tue, 15 Oct 2019 16:45:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D825220650 for ; Tue, 15 Oct 2019 16:45:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388231AbfJOQpZ (ORCPT ); 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-Google-Smtp-Source: APXvYqyCr+2dtAe4fWd6QTmS4rnjNno+NHjgK7brIt6EL/DeVt+mmOemmSBJxtvCQImIDFF/T0HX6+lr9I76HpMLaag= 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