From patchwork Mon Oct 16 13:09:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 15425 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2908:b0:403:3b70:6f57 with SMTP id ib8csp3449347vqb; Mon, 16 Oct 2023 06:11:10 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHiGSb7YwGQbIG8rlHx9oHAV/MGuE/0XMDP42pxLZLAmcmhC5asOLzfSskCtJBT9mgFpg2J X-Received: by 2002:a05:6a00:3386:b0:6b2:51a0:e1c9 with SMTP id cm6-20020a056a00338600b006b251a0e1c9mr10008769pfb.1.1697461870357; Mon, 16 Oct 2023 06:11:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697461870; cv=none; d=google.com; s=arc-20160816; b=SH220iAPrGxmJNT6A55nwc7eppiDTycB5uR5mzK7CZqcYk/6brTS2+3pk59CR23i64 BtgRzzQihxu2ERIcNskfxopDriApFT8F1KdDFvj7va9cawuLLudVQWWXtiQ3mwKDJ/9l HRNmmP6z7xpaQ8wTcyYw1wbjpipwyRsJthp30mvmqFAby3cB+wtTnhzbLjNpOKZIKFb0 0sZpt4gtAUBnpt4ur5z6lwPmcDvCOW1ULecnVnDxR2b7zyOmhpOuiSj60ZEgYumCpEJs 3F6MGfcqEHd8gH5By3AAdr+9wpjCuGrZnipH3/2CXheq8eS06VIOyZMeXG5pOPdvB8FQ hUuw== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=ukPTN33SwHJqExWhblBv9+VtxryvThcrvfydk1qJa4M=; fh=YYrWResMAxfU+C17BdM7l/WUXXvK87rdz5rOaZ9UMD0=; b=sHUjj8oULmcJ6EIp/rzV0Hch25IQQSdHje20PHk+6n8X7vFZRG7cOox1ZSdFYxoQEa O8hLx2I1PtMj6zlOXmB9OwLyYH/gdndmurLcBJgOZUdZW1raxXlcrIGadKoW1IimDTZq DppwClBhC303cOCmnxEgG7wyCib4he8JwSvrCr7f96UD7E2rcbg39q06542sNMh9rFaV A4K1bGu8gzPF/IjtIgKxWekzMWcYb5igYSiXknCA2OpqSsgz4lkwi8N/THlffcvPD/Vx 8nQ4nSf7O7AOefGGyWFFb/LHhLYNLZXDbBIfRA4PH+CBUQK5vv8QyofOjC6gpC9hq3eL 72zA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=iti1+qk5; 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 z2-20020aa78882000000b0069026fd5a48si7708444pfe.34.2023.10.16.06.11.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Oct 2023 06:11:10 -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=iti1+qk5; 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 504BB80756D3; Mon, 16 Oct 2023 06:10:31 -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 S233706AbjJPNKD (ORCPT + 18 others); Mon, 16 Oct 2023 09:10:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44336 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233634AbjJPNJv (ORCPT ); Mon, 16 Oct 2023 09:09:51 -0400 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.9]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DF050E8; Mon, 16 Oct 2023 06:09:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1697461790; x=1728997790; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=FpyMkWTaSMiOJg/zrSh3Kkfek6DFC2dej1hPH9Rx2iI=; b=iti1+qk5lLoIzKFMKfK9pGJ5Yv8dq8063BbTdUPgcRor8F6cef0JEGqW xvgElhXeErzxXAaLXW0Yy4CMdzka19oO51AGa3DQOuWfqBKg0YRxDvkmD 3gLwROnzSVvK3SRu2+lQvc1lvy74G401TvAJyuCY9L1rurOZ5/q1VXsTI zdclEqF4aXxXLMT1H+u1EdoMjb+6ekV5ovdTv5/XnDGVgCR1qGTDHdVSE ysJgkhoxKtEygCcfG36Hwo+vygqegbk1MxYcv9KjmOudcWeq+axuBQWB8 3R6edTTdMnYmwKLgI3jxCJG0mZ3rLWm1JG9sgBmZsLBYWfMCQddplocPo w==; X-IronPort-AV: E=McAfee;i="6600,9927,10863"; a="4133291" X-IronPort-AV: E=Sophos;i="6.03,229,1694761200"; d="scan'208";a="4133291" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Oct 2023 06:09:46 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10863"; a="1087067135" X-IronPort-AV: E=Sophos;i="6.03,229,1694761200"; d="scan'208";a="1087067135" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga005.fm.intel.com with ESMTP; 16 Oct 2023 06:09:41 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id EB53B385; Mon, 16 Oct 2023 16:09:41 +0300 (EEST) From: Andy Shevchenko To: Andy Shevchenko , Mathias Nyman , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Mathias Nyman , Greg Kroah-Hartman Subject: [PATCH v2 00/10] xhci: dbc: Update driver to use modern APIs Date: Mon, 16 Oct 2023 16:09:24 +0300 Message-Id: <20231016130934.1158504-1-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.40.0.1.gaa8946217a0b MIME-Version: 1.0 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: 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:31 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1779917778250492538 X-GMAIL-MSGID: 1779917778250492538 Update driver to use some of modern APIs. It's not a full clean up series, just a set of ad-hoc changes. In v2: - fixed mistakes pointed by Mathias and LKP - sent with a cover letter Andy Shevchenko (10): xhci: dbc: Drop duplicate checks for dma_free_coherent() xhci: dbc: Convert to use sysfs_streq() xhci: dbc: Use sysfs_emit() to instead of scnprintf() xhci: dbc: Use ATTRIBUTE_GROUPS() xhci: dbc: Check for errors first in xhci_dbc_stop() xhci: dbc: Don't shadow error codes in store() functions xhci: dbc: Replace custom return value with proper Linux error code xhci: dbc: Use sizeof_field() where it makes sense xhci: dbc: Use sizeof(*pointer) instead of sizeof(type) xhci: dbc: Add missing headers drivers/usb/host/xhci-dbgcap.c | 132 +++++++++++++++++---------------- drivers/usb/host/xhci-dbgcap.h | 1 + 2 files changed, 70 insertions(+), 63 deletions(-)