Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp618927pxj; Thu, 20 May 2021 18:05:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzSOpB9wL1gpYlGc1bJWhaedZcvi2q71+7JfMLkWWGtli0/affyUKn06eWDEKxBsaeY1kiX X-Received: by 2002:a17:906:7c02:: with SMTP id t2mr7410945ejo.0.1621559124328; Thu, 20 May 2021 18:05:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621559124; cv=none; d=google.com; s=arc-20160816; b=LkYmHCVbJWT3p+qpxRXIUjhvw+6xVCiSAbXAVDlbaEEUHS2XOdNtEcx+GYyYZCrbKZ IFBfj3GQw+Y6tLzoCUXhbFWfVqncT658tdkk+7eMloxGxLAqG5C3kdh7c0iSexqrJLKJ fEt2a+dd6QKAYbo3s627vR5Ydj27UKmeMZFaRRsGNeF/ZiJDeyReUTZW17+J9Sjg1vC0 IemmJryiNarnmRyizQHTOObtcp5GQxByZMK2jOEILuRpATtYdLGVjKpp+VeaP9Z2mkH/ 45DdadBpe3ld10/x+fTVoELqGx6yoYKBBubJn0LjeMzgLeeHlPQ6QkOtbeKQ3frEXr+r Q39A== 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=It23AM7T0MIog6mmIJchTmM6PsVDGAArfuftShFvqFU=; b=uxFwqmxte2kLXjtWlVtZkdrcK7mtl7zm7Vb3hwaNQqwqW2w5TIzKVUfVbKo8mENYAy A3xC3d5JC9M6T6d7dJ0EQe0VX+D3iwdWkZqtIBuYr6xDOUhe3Mpx+lR+atRMMr2NvuO/ VnqaQd/q/RAtBs1YnCSmXi0CW8KNctTcCvAVwOOdJxXUEa9TC5fLdWVu42AgaI3mVQtU HkUur86ICGT6NBdECjIJZr6OLglEiyjFNK8XpZQiQiIGxlSQ3ZdfC+Tejyjf4kP8dqR1 EJ9I+SNId//HHAkuxsjdC+p/nqn1lFjTrjLqLuP03zk4hhKSdtbGLciae9+gcJAsgO1R Txjg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=gSYpn8FK; 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 b5si3526697edf.3.2021.05.20.18.05.01; Thu, 20 May 2021 18:05:24 -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=gSYpn8FK; 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 S240448AbhETLiF (ORCPT + 99 others); Thu, 20 May 2021 07:38:05 -0400 Received: from mail.kernel.org ([198.145.29.99]:38694 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239786AbhETLRn (ORCPT ); Thu, 20 May 2021 07:17:43 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 7707861953; Thu, 20 May 2021 10:09:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621505390; bh=70Q2zUYevucvksNKB1LJtedxE0esBWEfuNKP45SGFWA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gSYpn8FKw4W/vxChinhlARKvw954L8Am0z/2rydVShNZnHDx6BLWTSfyRhplvwgLc uZnFrjjOXSRzAAC6Eaiqz/joHQKgOoVhBwekbFGsHd+7/0TQ03ARFxEn5SmPTQVPAR 7QB5CFKzoEu/luPvI7H7juor7EnUrjx+413Z9dG8= 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.4 079/190] usb: gadget: pch_udc: Replace cpu_to_le32() by lower_32_bits() Date: Thu, 20 May 2021 11:22:23 +0200 Message-Id: <20210520092104.809400111@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210520092102.149300807@linuxfoundation.org> References: <20210520092102.149300807@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 f4b81e8f2272..6e84b27c14dd 100644 --- a/drivers/usb/gadget/udc/pch_udc.c +++ b/drivers/usb/gadget/udc/pch_udc.c @@ -1797,7 +1797,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