Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4593311pxj; Wed, 12 May 2021 08:52:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzZtutrEN63sGJSC7RCS4+bkegZIC0fFqf9pTGpIUSBSxUV+1+GC/Wu0qj8zH2+n7hggpXR X-Received: by 2002:a05:6830:1484:: with SMTP id s4mr30714039otq.68.1620834767841; Wed, 12 May 2021 08:52:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620834767; cv=none; d=google.com; s=arc-20160816; b=UU0aEnCTQROFc/EGQT2TIJ46sYresudgsJLT6Cugrtwb7dAzjeVnzdw8a4VTPqH7ep ZqxFvBlF0khYvaZB0nGD5BOiiRsRC4tSrIRQB4H2OfIE2GHbBfXmii/quUKoSXVAtPPy yscN6TcD/whLuOUTEglaqcVKbYTZOxfIb6/pwFo+0no2jYEb8qonUoteGtAiNjFw9U+T ukmdO7o6gSc5CyM8nuGB7Ecad9AkraexglagggA3xSWMBe3AYRU0+pF09OnopYtngKbK bZlnNX1k1jD+sQ3aCIIoKs9AbgAOw54NH4xNUUaDgwvchW2IPjPshieLCb/k+G/PveR0 ni5A== 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=mV/Z49W3R87Y6+kDTRdN3xc7l8xWW8avE+b7B1UGRyg=; b=akNGUDk+b5H5edUwJdToPlabVK9relGykzdwkQkO9XP7Syh+Kxsnhk0nErG3CqIze7 Uv/Xa9EwjUa/AKksiDd6XOmfM7XAwVQzxeuldOBUOxlLSDH4lxyxHSzBTuFoSVRn8/3+ 7WXHJE2lMEGGgHIo2hXKUTfg4GXGLYpkl1zigHBT0SJ74rxUS4q95Xlsx0KAJreyta/J KBTVnHn49vbgq41Q18J0v1CjFDYC1cYPs4vctbiZsdR/nYxKfZrtlsyMHWykKWBYclpS W78Te3bZDlY6iHzEOlNhUcCtgVE6+EzPAVbGRK/WuHiAnkcCCcvI+D/dwTC3NGGKf0WB qzXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=2aGxsSNN; 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 e6si255876oti.120.2021.05.12.08.52.33; Wed, 12 May 2021 08:52:47 -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=2aGxsSNN; 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 S237101AbhELPsM (ORCPT + 99 others); Wed, 12 May 2021 11:48:12 -0400 Received: from mail.kernel.org ([198.145.29.99]:60836 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233779AbhELPWb (ORCPT ); Wed, 12 May 2021 11:22:31 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 686D4619AE; Wed, 12 May 2021 15:09:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1620832165; bh=W/KrvFtTsKzdSRtSo9b7lroA1iHtpS2iEEngG+L8HL8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=2aGxsSNNOK+pbIboU7VAVNKCT1fxrsn907W5cPslyDRLGNr7lm/509lJGL7LQtaN9 +TDobjw0beNgyKTtGJasLWTQ808TaYDea8Wa2kCieWQ5WpqTtIuSXgnOFLH6uOd5Cc Ck2VK6xvAo3mH4droz01YRw3/to26jNd0HIo7CF0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Andy Shevchenko , Sasha Levin Subject: [PATCH 5.10 168/530] usb: gadget: pch_udc: Replace cpu_to_le32() by lower_32_bits() Date: Wed, 12 May 2021 16:44:38 +0200 Message-Id: <20210512144825.360185298@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210512144819.664462530@linuxfoundation.org> References: <20210512144819.664462530@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 931a09fdbf6d..f6f8965c4f8c 100644 --- a/drivers/usb/gadget/udc/pch_udc.c +++ b/drivers/usb/gadget/udc/pch_udc.c @@ -1765,7 +1765,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