Message ID | 20231016130934.1158504-9-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 ib8csp3448891vqb; Mon, 16 Oct 2023 06:10:35 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGP78sdTQ8HydnZPX/KJnmIaMOesA3WAph3eFzsywtPcOb3+AVODa+cco8gC8jA6WLnK7Z8 X-Received: by 2002:a05:6a00:2e87:b0:690:c79c:1912 with SMTP id fd7-20020a056a002e8700b00690c79c1912mr37690303pfb.0.1697461835013; Mon, 16 Oct 2023 06:10:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697461834; cv=none; d=google.com; s=arc-20160816; b=03aNE/0xEYMSVB4gdrITapHRPOjxRqzENSSuAi623lLLWKnZUG3Sh5YzYgD4emfdKC fSjl3WuEHWqtl/+Cb3WdhG3mFef3lCH+ZPbS0WlXBkrbxr9aRUDOd6tKgSgLqW15gQoi 3Hnlx9nIGTFGO9OqjzS/kqo5mdt8oEoYdC/MPr1q1CtiCIdmXVc+cSNu7b5FF17FCVNc K9Or6HB7Ry7yn/P+3qWVhgVGPQt4iNWLur57LM95Dbl4/+gMoQgoNPlLjZ+xXRlLQBc0 4ayyU39zBZUtWy7QM8wy/DkGcvjLc6xfMNJSQ7KwNy9IahCvEeB50MLtEC5gygkSDSDk wspg== 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=xGVBxjVb8H2ZLA/8ONIKjrs3rciZM5Z6mnesdpv6lbs=; fh=YYrWResMAxfU+C17BdM7l/WUXXvK87rdz5rOaZ9UMD0=; b=cNUwd5nP4Ra6NMSLxC1skwkzkDdLqbxHNauakyyrq6MckqbwyAZj1FqC3KIMSoU75+ PRcpvTeeBCJfk9DnbsKLincW48Z3hOC6WJir5gDt56upbQtyBPrY5luQ76CobWRF2UdS 1dNX1UCbfouhj8yJpc8mFkVzaVf1RYMOk1SY80LPJPvKWOVPaJswGrOMIztL28+mnJOY Iae6Uf1TAwIZetwJPBnnrrar/WD6u09QKasUx51P8A/9V87rqTEdhIhWe8ynr/+v+ZgG y+Lshhx+WIX+0/WGXTyvRnruCnVhNlSEH65RKj4iJKOQQK3KLbctn37557njnCvPNPf1 XAQw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=dC5wpAJm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 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 lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id k11-20020aa7820b000000b006b356972c78si6338853pfi.405.2023.10.16.06.10.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Oct 2023 06:10:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=dC5wpAJm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 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 lipwig.vger.email (Postfix) with ESMTP id C5B158047D51; Mon, 16 Oct 2023 06:10:31 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233638AbjJPNKR (ORCPT <rfc822;hjfbswb@gmail.com> + 18 others); Mon, 16 Oct 2023 09:10:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44428 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233657AbjJPNJx (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 16 Oct 2023 09:09:53 -0400 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.9]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 81F56F5; Mon, 16 Oct 2023 06:09:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1697461791; x=1728997791; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=m/NysSCadA0TJULbiXS8GGWTrMOochBOaLvqBFQytEY=; b=dC5wpAJm7y7MTeUb3vuR/ZipZ93XxyoXmL3P9mVZK7jXi/a4pYq+If3J KsAnOWNpgkn48dwxO81XCQdBrmvbI5yun99QVyOvPGQm7+ZfIzsUcBVeL 3aolT2THksFfzKdXudti1N0MRnYNm+mK3rh6G3MmPtZ17ySei9kU+EgJs GZ170kqBGY8TfG9sLy7wZSVhWZ8/oYoQhQrq4t32Yzz8Eiuwj85mBKwx9 hPw+9Vqq7DS58N7zFpOeZ+oQ7aniRUzc9Hxg26+mw0GTlsuWg83zm3DFw 1pNuqg+0+XJActXXs2cdSTyR767pW1NHDnNa8IkzUWuXFiBQlueng5Gxc g==; X-IronPort-AV: E=McAfee;i="6600,9927,10863"; a="4133305" X-IronPort-AV: E=Sophos;i="6.03,229,1694761200"; d="scan'208";a="4133305" 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:49 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10863"; a="1087067145" X-IronPort-AV: E=Sophos;i="6.03,229,1694761200"; d="scan'208";a="1087067145" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga005.fm.intel.com with ESMTP; 16 Oct 2023 06:09:44 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 4DCC2A59; 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 08/10] xhci: dbc: Use sizeof_field() where it makes sense Date: Mon, 16 Oct 2023 16:09:32 +0300 Message-Id: <20231016130934.1158504-9-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 lipwig.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 (lipwig.vger.email [0.0.0.0]); Mon, 16 Oct 2023 06:10:31 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1779917741199806585 X-GMAIL-MSGID: 1779917741199806585 |
Series |
xhci: dbc: Update driver to use modern APIs
|
|
Commit Message
Andy Shevchenko
Oct. 16, 2023, 1:09 p.m. UTC
Instead of doing custom calculations, use sizeof_field() macro.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/usb/host/xhci-dbgcap.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/host/xhci-dbgcap.c b/drivers/usb/host/xhci-dbgcap.c index 779a564ad698..0c9fd61e9c5b 100644 --- a/drivers/usb/host/xhci-dbgcap.c +++ b/drivers/usb/host/xhci-dbgcap.c @@ -374,7 +374,7 @@ static void xhci_dbc_eps_init(struct xhci_dbc *dbc) static void xhci_dbc_eps_exit(struct xhci_dbc *dbc) { - memset(dbc->eps, 0, sizeof(struct dbc_ep) * ARRAY_SIZE(dbc->eps)); + memset(dbc->eps, 0, sizeof_field(struct xhci_dbc, eps)); } static int dbc_erst_alloc(struct device *dev, struct xhci_ring *evt_ring,