Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp544674pxj; Thu, 20 May 2021 15:50:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxh++JXjWBUouJzqKqUJDfYqU2GHlGpAhUEDvIOpRt8QA21leJEoO1rRBBjYvIJxuBYl4bo X-Received: by 2002:a6b:cd08:: with SMTP id d8mr8262911iog.86.1621551040070; Thu, 20 May 2021 15:50:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621551040; cv=none; d=google.com; s=arc-20160816; b=mSVU9XCQ3a6w8ySbW2INrrlfH7BR0dL19FsGiCuMcVmjfaDob8mZPnd23RUZokMrt1 Gox9buv6/3A2r4jTKVJczJ38CbMWCEUtIAMvltfTMIdNDRgVlvARtXr4gYNbznajaYn6 +zj1Mup49ZoRgQFGypmEtKAK9ScvQAF07KxgiFEF/JR5HYGSwWCzGoA8Y9SysCJxufDn F7vRAjU3KCtqluHv8teDj2kO0ZtlJruvJxbLLFXRlu6nfln3iaigz211OSEt07OIqnZj IuKYMzOXXoqE768rConqQodu+OC4JOm+Lv24mJmbNvd0UIUsL1P4F4uD8RDIwNua0AAJ zo/A== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=+6L2qyglyOzaOr40A1aBj6AyxeJfz2ONZ9BWgqREp9g=; b=oCI2L+7TzIt3IlCW1BODnr5XtbKmrz0RsDn2aK0hzYqU00DhatAOAoLca/wnlINKgh WHeUCh4t4r0Ag16X5TA6WAATxPrM1LtMiqCyKLye5wW+klka6KkPQ/DzTu0CWYcKfeGW cgi9xRtsD813ZyqceqJaHPz4FcdXSkOz7UTarWH1MsGCCx0pVqf9GXLo1C27LDrEEL6a mZQB+R2wmzYA3jYAFEqAQv6aCwMSnPVVdun4+Fh5Ig6sPFBdXLAvM5rEBPtnNsKM9kWw 0pqlro5dq3sE6B/eqnGSunuiSBczRa3QCl+Ittbyl8E4P6OSieT04RilRH5etygPy9lp BxEw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Sbd+2Dvu; 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=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v3si4073168ilq.36.2021.05.20.15.50.27; Thu, 20 May 2021 15:50:40 -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=@linuxfoundation.org header.s=korg header.b=Sbd+2Dvu; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240110AbhETLMV (ORCPT + 99 others); Thu, 20 May 2021 07:12:21 -0400 Received: from mail.kernel.org ([198.145.29.99]:52622 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239164AbhETKwX (ORCPT ); Thu, 20 May 2021 06:52:23 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id EC465617ED; Thu, 20 May 2021 10:00:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621504822; bh=lKoKTgKtr5NCHeERk3WhuHy3SPTHX5GdrDmN1V3qPWg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Sbd+2DvuVVvTiCeZPYKKmGw+RggrDQ6otfRpFywl6FUi00MTbbXY/3qgnCF8Folfc +7Z0QNvEzZukwsERe2cEfOkLVB6rgl+ecgvBeUxrzqYJrdj5jz7wJNEmswy7WdInHA A8cYL5quIqdWX6MxP8+yKvoqranAz15OSK+LWQQ8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Andy Shevchenko , Sasha Levin Subject: [PATCH 4.9 096/240] usb: gadget: pch_udc: Replace cpu_to_le32() by lower_32_bits() Date: Thu, 20 May 2021 11:21:28 +0200 Message-Id: <20210520092111.912562822@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210520092108.587553970@linuxfoundation.org> References: <20210520092108.587553970@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Andy Shevchenko [ Upstream commit 91356fed6afd1c83bf0d3df1fc336d54e38f0458 ] Either way ~0 will be in the correct byte order, hence replace cpu_to_le32() by lower_32_bits(). Moreover, it makes sparse happy, otherwise it complains: .../pch_udc.c:1813:27: warning: incorrect type in assignment (different base types) .../pch_udc.c:1813:27: expected unsigned int [usertype] dataptr .../pch_udc.c:1813:27: got restricted __le32 [usertype] Fixes: f646cf94520e ("USB device driver of Topcliff PCH") Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210323153626.54908-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin --- drivers/usb/gadget/udc/pch_udc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/gadget/udc/pch_udc.c b/drivers/usb/gadget/udc/pch_udc.c index fe0887578117..b143830285f6 100644 --- a/drivers/usb/gadget/udc/pch_udc.c +++ b/drivers/usb/gadget/udc/pch_udc.c @@ -1786,7 +1786,7 @@ static struct usb_request *pch_udc_alloc_request(struct usb_ep *usbep, } /* prevent from using desc. - set HOST BUSY */ dma_desc->status |= PCH_UDC_BS_HST_BSY; - dma_desc->dataptr = cpu_to_le32(DMA_ADDR_INVALID); + dma_desc->dataptr = lower_32_bits(DMA_ADDR_INVALID); req->td_data = dma_desc; req->td_data_last = dma_desc; req->chain_len = 1; -- 2.30.2