Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1805818imm; Mon, 3 Sep 2018 09:55:28 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYENqEqJgh7M+xA0TO2xMZ24PivRysTjqIjpBbxukmAnSYYN8JrlnhB2m7/BhTseoE26ddL X-Received: by 2002:aa7:8087:: with SMTP id v7-v6mr30253939pff.38.1535993728243; Mon, 03 Sep 2018 09:55:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535993728; cv=none; d=google.com; s=arc-20160816; b=Ez9wk+0xfG/JAZ4uyQCLazVqf3Ktj8cXdzurQJgCAWuJ6QGGTg0a46omVUrK5EvvcZ q86BpggB1QYyoxHpi0Tu3B2i9iuHIIif+pzOBbnic8u7ymwefxFY5V4rC4pqp8kEU/FO GREZSfFOeH9Z7nzT2x/pfwqVC6U0w4PtMCkbipINBwc0xQu2Ir2+YhSUWwjZB5FJ2qwL dsG8upNVfGfiuxpxBb6axhWK4LbgxfDDihNIRjaEQQji8ifu+2i8D50J5lTMpk6QPc4d 6ZGrkQ6Yb2B3b5nJ+m8Jzd7Jno5O3kMbgX8oBairN0udg4cwk5x7AZGdSK5oPkYe8ZUV xxjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=PSNAGdxYIOLmM3wuEcF321fyQJHsPKP7boKZLrRCBTU=; b=qGwaO5mqJV+ghZZoQcXhvdWDWw6vyryf4cyi2Zi2Hpf9l1mHb/dk85+XK8+XbWhT7k YGgc/2zQibeMBRMGSIWasZ2eoPD9ePsD8npxHX+JCe2zmaHetSQ8+5Byr4+bJRgGcgCO JbDAO720jd34oQufgTE6s5nEPjl6r8muT9a/gCUz53wkxKyn+M2P6W81aLxc3ueyvg8a XhDtG8IFQYBbBqT2y1IjALjtDPx3j1lmesWLteX9zNUM3N93bnuQAl/sa7+iWnVEjX+H lw0zgXCfQmVJXf32iYXOhc1iW8jATT3EWtUSH3W+qL7BNT62GN25bgHVpaLzskpLOeCd 0cww== 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 y13-v6si15705058pgl.555.2018.09.03.09.55.13; Mon, 03 Sep 2018 09:55:28 -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 S1728804AbeICVOY (ORCPT + 99 others); Mon, 3 Sep 2018 17:14:24 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:38126 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728794AbeICVOX (ORCPT ); Mon, 3 Sep 2018 17:14:23 -0400 Received: from localhost (ip-213-127-74-90.ip.prioritytelecom.net [213.127.74.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 87D75CF3; Mon, 3 Sep 2018 16:53:25 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Randy Dunlap , Felipe Balbi , linux-usb@vger.kernel.org, Michael Ellerman , linuxppc-dev@lists.ozlabs.org, Felipe Balbi , Sasha Levin Subject: [PATCH 4.4 14/80] usb/phy: fix PPC64 build errors in phy-fsl-usb.c Date: Mon, 3 Sep 2018 18:48:52 +0200 Message-Id: <20180903164934.723075049@linuxfoundation.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180903164934.171677301@linuxfoundation.org> References: <20180903164934.171677301@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 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 4.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Randy Dunlap [ Upstream commit a39ba90a1cc7010edb0a7132e1b67f3d80b994e9 ] Fix build errors when built for PPC64: These variables are only used on PPC32 so they don't need to be initialized for PPC64. ../drivers/usb/phy/phy-fsl-usb.c: In function 'usb_otg_start': ../drivers/usb/phy/phy-fsl-usb.c:865:3: error: '_fsl_readl' undeclared (first use in this function); did you mean 'fsl_readl'? _fsl_readl = _fsl_readl_be; ../drivers/usb/phy/phy-fsl-usb.c:865:16: error: '_fsl_readl_be' undeclared (first use in this function); did you mean 'fsl_readl'? _fsl_readl = _fsl_readl_be; ../drivers/usb/phy/phy-fsl-usb.c:866:3: error: '_fsl_writel' undeclared (first use in this function); did you mean 'fsl_writel'? _fsl_writel = _fsl_writel_be; ../drivers/usb/phy/phy-fsl-usb.c:866:17: error: '_fsl_writel_be' undeclared (first use in this function); did you mean 'fsl_writel'? _fsl_writel = _fsl_writel_be; ../drivers/usb/phy/phy-fsl-usb.c:868:16: error: '_fsl_readl_le' undeclared (first use in this function); did you mean 'fsl_readl'? _fsl_readl = _fsl_readl_le; ../drivers/usb/phy/phy-fsl-usb.c:869:17: error: '_fsl_writel_le' undeclared (first use in this function); did you mean 'fsl_writel'? _fsl_writel = _fsl_writel_le; and the sysfs "show" function return type should be ssize_t, not int: ../drivers/usb/phy/phy-fsl-usb.c:1042:49: error: initialization of 'ssize_t (*)(struct device *, struct device_attribute *, char *)' {aka 'long int (*)(struct device *, struct device_attribute *, char *)'} from incompatible pointer type 'int (*)(struct device *, struct device_attribute *, char *)' [-Werror=incompatible-pointer-types] static DEVICE_ATTR(fsl_usb2_otg_state, S_IRUGO, show_fsl_usb2_otg_state, NULL); Signed-off-by: Randy Dunlap Cc: Felipe Balbi Cc: linux-usb@vger.kernel.org Cc: Michael Ellerman Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Felipe Balbi Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/usb/phy/phy-fsl-usb.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) --- a/drivers/usb/phy/phy-fsl-usb.c +++ b/drivers/usb/phy/phy-fsl-usb.c @@ -879,6 +879,7 @@ int usb_otg_start(struct platform_device if (pdata->init && pdata->init(pdev) != 0) return -EINVAL; +#ifdef CONFIG_PPC32 if (pdata->big_endian_mmio) { _fsl_readl = _fsl_readl_be; _fsl_writel = _fsl_writel_be; @@ -886,6 +887,7 @@ int usb_otg_start(struct platform_device _fsl_readl = _fsl_readl_le; _fsl_writel = _fsl_writel_le; } +#endif /* request irq */ p_otg->irq = platform_get_irq(pdev, 0); @@ -976,7 +978,7 @@ int usb_otg_start(struct platform_device /* * state file in sysfs */ -static int show_fsl_usb2_otg_state(struct device *dev, +static ssize_t show_fsl_usb2_otg_state(struct device *dev, struct device_attribute *attr, char *buf) { struct otg_fsm *fsm = &fsl_otg_dev->fsm;