Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1823680imm; Mon, 3 Sep 2018 10:21:59 -0700 (PDT) X-Google-Smtp-Source: ANB0VdaUBPudUuOVRV29FcsV38O7Q+d6g2/jScPbcC0TJNHTzSBF9QAegAZ1uypJVhoap0drReNN X-Received: by 2002:a17:902:5a4e:: with SMTP id f14-v6mr24368136plm.311.1535995319760; Mon, 03 Sep 2018 10:21:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535995319; cv=none; d=google.com; s=arc-20160816; b=kVg1GOwpd0GWIRYbugyFeJdltFOJDuZ/WQNzDf2xCH6PPdcOxI6YUdZX/GRFPWHMow Ee1hnf7iFSMurw+joxriGYAU9EBDPqsRoNatfhJFt7yCy6V1yWxPIARMOrlatx2re7fq 3NeUmZ0Ej2pGINqh307wdtaJw9EENExZb9q8rnXgxpwtxpsD4Tx0HIKSN/IwiCsgzD71 KCoChNLccNtZ3EboAKbdF6NoZ5jSvgT3CzDsXNE8Mn9EXM2hzDkQHJtuq273J5Y6sRHu ijHgqJEGR/hKGrwP/YAMjzq4CLdnr+e5/uQPfBrn3JxeQKdL/GwmmB28ZnoXO5GUaYVM 02gg== 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=XEtRzyfVUEhb9jgXo2HZpVfQTZzGNAzAi3ZdtzwZl5Y=; b=xzy6Y0v163CtPfDxWOjUbYDUA9msnolK82HLvJGjO8qSM9b+1m1aFbUvb8bUc+AvwY vYu93dnFbjjhfb2QqpvVJXA5VqW/Evq9yIdDCix7T58SI1TdzwNMcKz0Ql9RJhKnA/Gk rHWq1/lJBdjPHMF7uh9gMhh+IxYXB7wwfagMzNMwwCMKkVx0uiXAVXhevQH4WUcLnksh 6sgiIpzfj9X9ky0exh8b4BxnZY8dzY4rgmOuXqUtba34WKVuaSe96ijjZs6O/X8bZK+q oeTn/kQ/kBXv2rczBz7RomJtuMAPYOTABGu/rTHIVe5WZeXwy9xCcZGc1gRCSvKFKgbV QeMw== 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 s125-v6si20277756pfb.335.2018.09.03.10.21.45; Mon, 03 Sep 2018 10:21:59 -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 S1730320AbeICVjV (ORCPT + 99 others); Mon, 3 Sep 2018 17:39:21 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:43016 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728314AbeICVjU (ORCPT ); Mon, 3 Sep 2018 17:39:20 -0400 Received: from localhost (ip-213-127-74-90.ip.prioritytelecom.net [213.127.74.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 6D1CDD12; Mon, 3 Sep 2018 17:18:15 +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.14 024/165] usb/phy: fix PPC64 build errors in phy-fsl-usb.c Date: Mon, 3 Sep 2018 18:55:10 +0200 Message-Id: <20180903165656.241065950@linuxfoundation.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180903165655.003605184@linuxfoundation.org> References: <20180903165655.003605184@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.14-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 @@ -874,6 +874,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; @@ -881,6 +882,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); @@ -971,7 +973,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;