Message ID | 20231016130934.1158504-3-andriy.shevchenko@linux.intel.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2908:b0:403:3b70:6f57 with SMTP id ib8csp3448615vqb; Mon, 16 Oct 2023 06:10:13 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEtTkRvpzLQp4ap/g39mZOiod14h6lAZb1g6nVKtQ/aVsAsFEd/z7YsMgvoiY7imYp4EcfT X-Received: by 2002:a05:6a00:4ac1:b0:6b9:7d5c:bb58 with SMTP id ds1-20020a056a004ac100b006b97d5cbb58mr6714366pfb.0.1697461813010; Mon, 16 Oct 2023 06:10:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697461812; cv=none; d=google.com; s=arc-20160816; b=xscWUlzk6krNviJhHCqxuIie5as79PP9C/zVsppanNHzZ0lR2U4AYwN2seomLUUPG+ oo+PS5oMrmOR3ExVwFSe8+VJ8KKOgd0HBBRkn1P9jTv9fNMyStNr3uAnYPBHPFRsFfEN JflQJsM09DOBXU8ri+uJPhiToy1VNUJnvQ8M2Wj0ig7AmZMvTO8Cm2RGXH+T3E7qx0LR XfNoWurElp5GedjfZUJmaQGy/u10Qp5X88o+hqcPZ6pIncBu6eLXXu1GH7kUsA1X3GZn PzYPOOH3++GhEsIbqNMnnVY/ZBkWsKiWhBVXtJWWrCYHxDse0db6spt6v09l+2OgGuss OP1g== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=j60jGTg3G58JVB3Frw5diCuTaOBrDrAQrr7tkpco1DE=; fh=YYrWResMAxfU+C17BdM7l/WUXXvK87rdz5rOaZ9UMD0=; b=f0P2njn5G3Dfy8KPh+jcFbxMDg2FIhP+7US5MWU6DbLhFF4DwRJcAE5igbpCFrBIa/ tX9kHiZJ8DAWfP1wwQgT2Uyyxx80EUkoZsfZ4vLbq/vbdWDYx/XGLJ9Mp3GMUaTzaXVE Hg7b3a26m+IwTlkAhTWv2kyMobxVGAZfVctXZvQQeeRG7UPIZiiwecRcsKtzzbcfzV90 Al/2LlqW1T9fCjbafT734pwO0ctIW+FZd4ZdL3ai9O+h1AIZxjZWbo69yFXtd1M40C5k p9H32Yvnl3TyzgROAJG65bze4ze4JEaThan9ToyXVtdxiZgAg3FmogmX9QXnfxw7Qcmf anwQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=dfok7jaf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id l65-20020a633e44000000b005ad9894a223si6871031pga.326.2023.10.16.06.10.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Oct 2023 06:10:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=dfok7jaf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id D98AD80ACFE3; Mon, 16 Oct 2023 06:10:06 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233540AbjJPNJy (ORCPT <rfc822;hjfbswb@gmail.com> + 18 others); Mon, 16 Oct 2023 09:09:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40140 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233630AbjJPNJs (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 16 Oct 2023 09:09:48 -0400 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E836BF5; Mon, 16 Oct 2023 06:09:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1697461787; x=1728997787; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=5wFq2LWIAxkbz3owrFJUzWLLHVZI7rE5EIksKjGKEtQ=; b=dfok7jafci87ko77G726DMhHigZPsbaTky0XT2Ty5RmmAqX4eGd/tCYq PDFXk8uRZ4JndD5CZa1XwuYAiTmJEk/L8wX+GfMT0Co7C5MYWoHJ5pSEM 1l/2MsvRg1P/uMW3M9DkG0NEO+uM3D+xqxxLFO+AIJuQ+ph49IJmfuVaq vm/kS8GnKCWpS+ejtKjQGQ/9M4Xc7haJ8UPTGOeQ8Lc34IFl+2YZdaKwV p56L/Ogj/OwYMhYYX1qG8kdmhQNq0I/NX2uTMiQZYkI60C6CT8dxmVER/ 97o/7WdwuIbL1FFK3DHum3kWIPDOR3nCmjkv1J1acZbX9ggvL5TQ4FQWp w==; X-IronPort-AV: E=McAfee;i="6600,9927,10863"; a="416590139" X-IronPort-AV: E=Sophos;i="6.03,229,1694761200"; d="scan'208";a="416590139" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Oct 2023 06:09:45 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10863"; a="759385503" X-IronPort-AV: E=Sophos;i="6.03,229,1694761200"; d="scan'208";a="759385503" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga007.fm.intel.com with ESMTP; 16 Oct 2023 06:09:43 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 10A7285E; Mon, 16 Oct 2023 16:09:42 +0300 (EEST) From: Andy Shevchenko <andriy.shevchenko@linux.intel.com> To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>, Mathias Nyman <mathias.nyman@linux.intel.com>, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Mathias Nyman <mathias.nyman@intel.com>, Greg Kroah-Hartman <gregkh@linuxfoundation.org> Subject: [PATCH v2 02/10] xhci: dbc: Convert to use sysfs_streq() Date: Mon, 16 Oct 2023 16:09:26 +0300 Message-Id: <20231016130934.1158504-3-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.40.0.1.gaa8946217a0b In-Reply-To: <20231016130934.1158504-1-andriy.shevchenko@linux.intel.com> References: <20231016130934.1158504-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Mon, 16 Oct 2023 06:10:06 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1779917718014644703 X-GMAIL-MSGID: 1779917718014644703 |
Series |
xhci: dbc: Update driver to use modern APIs
|
|
Commit Message
Andy Shevchenko
Oct. 16, 2023, 1:09 p.m. UTC
It's standard approach to parse values from user space by using
sysfs_streq(). Make driver use it.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/usb/host/xhci-dbgcap.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/usb/host/xhci-dbgcap.c b/drivers/usb/host/xhci-dbgcap.c index 9e9ce3711813..f505b79afe53 100644 --- a/drivers/usb/host/xhci-dbgcap.c +++ b/drivers/usb/host/xhci-dbgcap.c @@ -957,9 +957,9 @@ static ssize_t dbc_store(struct device *dev, xhci = hcd_to_xhci(dev_get_drvdata(dev)); dbc = xhci->dbc; - if (!strncmp(buf, "enable", 6)) + if (sysfs_streq(buf, "enable")) xhci_dbc_start(dbc); - else if (!strncmp(buf, "disable", 7)) + else if (sysfs_streq(buf, "disable")) xhci_dbc_stop(dbc); else return -EINVAL;