Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1257141ybt; Thu, 2 Jul 2020 00:29:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwvhjftRj8BpIfdHI+KZJ/R5znBmjIjPCYZV4GtHgbyieyK2cey5WmJtEpR3jPv3/s3sOsb X-Received: by 2002:a17:906:26c3:: with SMTP id u3mr25481513ejc.483.1593674985344; Thu, 02 Jul 2020 00:29:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593674985; cv=none; d=google.com; s=arc-20160816; b=rHfnycffeB3PBFk+GK6j6RWYclMTL2ChfBa8HnD48AMWLjNDxrNf3VucSHIGtX9d34 qOSv4cRwUf++BhWLpPOgR+ZWMojlEStpiX2tbb1U2qWTt/vE2eSEacQjVkcDYlnpOVCr VX2I4vRJOS7aGKl7MbqYeqxdKah5p6TqJgBTbZJ4waRMG/IQsnUBa3jYSza1tFp/kdDc vrQeUGK1In44Xq/n/uN/x6WHquwJAAhP7rP7pdtgtFff/YaY6CUGoLLhPi915mJ1AV0g IbX4OOwFeNmg/jqoz1p0OdRivDndFfvB/I7ywZLfZUcuP/sisvXC6zA2TMS731RoHzT0 eGVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=HbEhprAdBt934ozYoJvORVD1DKH6qvieuDByhqHk3es=; b=CI58QrzjVyMwboKO2gA3EviCGlweGBPAXkBHpogUjcUEbzNxmC3RDxu4jJOuRzRVmE FQTEBbY2rVb+W/fFn98EXelJDP4ibDqdOLcxHTpkUE0yrL+RlMwddbRZ18MTaL4U6fBf YsQL4xV3z50UgCcCA4jjPK+lCk0Q4qubs7KQ24V2Z2/Jf+bxw5cVq0a1eK0Ie/Cx1YMf IHxaBOOgqd4o4Z/a0I9n03m2pAVEGoQPY/pM3xO5pmGuDZe+IRA2z7xUMW7CqTsZltD6 khHmzHM4Dn1p7HEogktwfiPHOtt6Y2DW8oAR08lU0Z0WEkV48Sy7AF/8kQfUX7a47Wcl 1pGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=BJHNo7S3; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cm10si5308818edb.208.2020.07.02.00.29.21; Thu, 02 Jul 2020 00:29:45 -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=@kernel.org header.s=default header.b=BJHNo7S3; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727938AbgGBH3O (ORCPT + 99 others); Thu, 2 Jul 2020 03:29:14 -0400 Received: from mail.kernel.org ([198.145.29.99]:59168 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726858AbgGBH3N (ORCPT ); Thu, 2 Jul 2020 03:29:13 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 3BBEB206BE; Thu, 2 Jul 2020 07:29:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1593674952; bh=u29VM/PVO5QZE/Adf28yl93d1nQzkhUiMwFZCmk0V2Q=; h=From:To:Cc:Subject:Date:From; b=BJHNo7S3LtJzfbzz7DTtUCKh5TGeXJlbdtD9ivfMqWhYZRpVaxGbGoXDGTwysxQtn JAdTdqyPiLPuEEKtZbw3gYgiqzBlv/MhLR220966ugzLx6OBP3NxVBx26+cAJUyZoZ nRPVLtRuzwdRfI+18mvnztIRfegO3N/7NKZwdqa4= From: Greg Kroah-Hartman To: balbi@kernel.org Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman Subject: [PATCH 1/2] USB: phy: fsl-usb: remove sysfs abuse Date: Thu, 2 Jul 2020 09:29:13 +0200 Message-Id: <20200702072914.1072878-1-gregkh@linuxfoundation.org> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This file has a HUGE debugging sysfs file that spews out a lot of information all at once, which violates the one-value-per-file rule for sysfs. If this is really needed, it should go into debugfs, but given the age of this driver, I strongly doubt anyone is using it anymore. So just remove the file entirely, it was never documented, so obviously, no one actually needed it :) Cc: Felipe Balbi Signed-off-by: Greg Kroah-Hartman --- drivers/usb/phy/phy-fsl-usb.c | 93 ----------------------------------- 1 file changed, 93 deletions(-) diff --git a/drivers/usb/phy/phy-fsl-usb.c b/drivers/usb/phy/phy-fsl-usb.c index b451f4695f3f..93d2257aeec8 100644 --- a/drivers/usb/phy/phy-fsl-usb.c +++ b/drivers/usb/phy/phy-fsl-usb.c @@ -957,98 +957,6 @@ int usb_otg_start(struct platform_device *pdev) return 0; } -/* - * state file in sysfs - */ -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; - char *next = buf; - unsigned size = PAGE_SIZE; - int t; - - mutex_lock(&fsm->lock); - - /* basic driver infomation */ - t = scnprintf(next, size, - DRIVER_DESC "\n" "fsl_usb2_otg version: %s\n\n", - DRIVER_VERSION); - size -= t; - next += t; - - /* Registers */ - t = scnprintf(next, size, - "OTGSC: 0x%08x\n" - "PORTSC: 0x%08x\n" - "USBMODE: 0x%08x\n" - "USBCMD: 0x%08x\n" - "USBSTS: 0x%08x\n" - "USBINTR: 0x%08x\n", - fsl_readl(&usb_dr_regs->otgsc), - fsl_readl(&usb_dr_regs->portsc), - fsl_readl(&usb_dr_regs->usbmode), - fsl_readl(&usb_dr_regs->usbcmd), - fsl_readl(&usb_dr_regs->usbsts), - fsl_readl(&usb_dr_regs->usbintr)); - size -= t; - next += t; - - /* State */ - t = scnprintf(next, size, - "OTG state: %s\n\n", - usb_otg_state_string(fsl_otg_dev->phy.otg->state)); - size -= t; - next += t; - - /* State Machine Variables */ - t = scnprintf(next, size, - "a_bus_req: %d\n" - "b_bus_req: %d\n" - "a_bus_resume: %d\n" - "a_bus_suspend: %d\n" - "a_conn: %d\n" - "a_sess_vld: %d\n" - "a_srp_det: %d\n" - "a_vbus_vld: %d\n" - "b_bus_resume: %d\n" - "b_bus_suspend: %d\n" - "b_conn: %d\n" - "b_se0_srp: %d\n" - "b_ssend_srp: %d\n" - "b_sess_vld: %d\n" - "id: %d\n", - fsm->a_bus_req, - fsm->b_bus_req, - fsm->a_bus_resume, - fsm->a_bus_suspend, - fsm->a_conn, - fsm->a_sess_vld, - fsm->a_srp_det, - fsm->a_vbus_vld, - fsm->b_bus_resume, - fsm->b_bus_suspend, - fsm->b_conn, - fsm->b_se0_srp, - fsm->b_ssend_srp, - fsm->b_sess_vld, - fsm->id); - size -= t; - next += t; - - mutex_unlock(&fsm->lock); - - return PAGE_SIZE - size; -} - -static DEVICE_ATTR(fsl_usb2_otg_state, S_IRUGO, show_fsl_usb2_otg_state, NULL); - -static struct attribute *fsl_otg_attrs[] = { - &dev_attr_fsl_usb2_otg_state.attr, - NULL, -}; -ATTRIBUTE_GROUPS(fsl_otg); - /* Char driver interface to control some OTG input */ /* @@ -1167,7 +1075,6 @@ struct platform_driver fsl_otg_driver = { .driver = { .name = driver_name, .owner = THIS_MODULE, - .dev_groups = fsl_otg_groups, }, }; -- 2.27.0