Message ID | 20230929141304.3934380-3-msp@baylibre.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:cae8:0:b0:403:3b70:6f57 with SMTP id r8csp4119857vqu; Fri, 29 Sep 2023 08:31:34 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFXEdzuurMWDsMNljC3+OhOLbeRbWbRLeK3GfayYD7YxcwdxMti53ib1VHPzFDHR9nsXmtF X-Received: by 2002:a05:6870:b292:b0:1e0:eb36:a7ed with SMTP id c18-20020a056870b29200b001e0eb36a7edmr4892139oao.29.1696001494406; Fri, 29 Sep 2023 08:31:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696001494; cv=none; d=google.com; s=arc-20160816; b=wcNNSObiqaTg/3a9pBhY76i3PrsmPjZkxBdRBeGMlY8/7Nb9UHbsNeGTnvGrOBjNsK BdC8aA0fyfest+DcZ515dlWrf9ELZdyDYonqUPmppJ7q1meKHJDuVvUox9KS7UqeNt5b Rw/2qVIWspgkaeoe6VNfZsz1ukqeJbW/1VZIxFP/fkykb91LlnLaTH7/b02t1tW58LZm SAZqtiY2/IQgcPjBtx1swSlOlL6F1LuaoI6K3b1LCB2Z4/cHMbfuh5s/8INuXQxrjaDt O2agA5vmQ2Nr6ZmQN3OF4zMW2mE7KHxzIytHe8LyapafGUIvITaZFodt/9TH2O7F11+3 cYng== 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=ReBi7BC06ODO44p0m+LSvmAR1HhRlF0fwYBoeL/cies=; fh=EtuWLR14IhIbZM+E+fYn4isj1Y+iLrncbbgmHIVUFEQ=; b=aaIaddXPKFnH2z7bdHITECVaW7I254WqvEyINm2y/9blYg7NohIqjm/Faj/5z2fEjT LBX9FeRo4HiS59SOTWezb4CpBuJlqQtMSEWctaF+byFGtUazi3l0JxXV5gznUAkNRCq2 3p35RNoyIyoWxP0THpNkSYlIZgw8O0Jw69la/LsBOTRSxs5zIPiEHtGmV5Q5PgXs0Rqn 8r7RpfMynSuOOekSu+gjg8d3dLzdDJa5mD7am8gktDkZSvApxqbjq7yP0F291XtWwiQ+ AZw4FBZpfcM4Twe7iL88uw7MO+vTlnR5pqkROOW0VFbSe7Gb2vKlwoBhhoaCgvPomIJA V0eQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20230601.gappssmtp.com header.s=20230601 header.b=y+MDBCG5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id l3-20020a654c43000000b00578c64433d5si21349170pgr.877.2023.09.29.08.31.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Sep 2023 08:31:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@baylibre-com.20230601.gappssmtp.com header.s=20230601 header.b=y+MDBCG5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id E2C2B81CFF2C; Fri, 29 Sep 2023 07:13:43 -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 S233252AbjI2ONT (ORCPT <rfc822;pwkd43@gmail.com> + 20 others); Fri, 29 Sep 2023 10:13:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44182 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233192AbjI2ONQ (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 29 Sep 2023 10:13:16 -0400 Received: from mail-wr1-x433.google.com (mail-wr1-x433.google.com [IPv6:2a00:1450:4864:20::433]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 301E91B0 for <linux-kernel@vger.kernel.org>; Fri, 29 Sep 2023 07:13:14 -0700 (PDT) Received: by mail-wr1-x433.google.com with SMTP id ffacd0b85a97d-32167a4adaaso13500093f8f.1 for <linux-kernel@vger.kernel.org>; Fri, 29 Sep 2023 07:13:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1695996792; x=1696601592; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ReBi7BC06ODO44p0m+LSvmAR1HhRlF0fwYBoeL/cies=; b=y+MDBCG563M0azVA82P9QiUidcI1xqAG91WBP78JW3mi3H72qhjiE16aPMrnZi2unZ aTO6xCsOGFGLM/AwlP86oHcO808pzcPZBDoD1reQImJ2v4cp1PaDauEJ7SFw4AMGg85V YVcZy0oadH879/ZKUk08TQL6Zn1crgCKyXCOtMa2hTwSEwF/QrENEqJqqGZ5wdtdh5Jv OyikaNdV3W8/m4wwV/qWlRpe4JorwzKHRb3ehYYMkC6ixx4RJ9A8yxJ62MiQjCbdrSoA akqbjUx/Y/EQFr3HsvBErRCWmnn0oN+q65D05hOHqwhNqeA/jUspG3jyCyVvcERxig30 +PgQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695996792; x=1696601592; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ReBi7BC06ODO44p0m+LSvmAR1HhRlF0fwYBoeL/cies=; b=LKYnJKG2S06aN1r3iOD6ChIJSq9iTw+4J4UaZE/PZHqgE9bR4J8Ey9vcAekCknmQ5s lrci8UdH9v5TfzjvWjd02cJ1WY4gxvVDrj7UFnT0KUB2hEYNMATzwOth197vFq3JlUlj KnMCYLKJrUvlWxGDGurQ77fH0rSDrazNdnB55ORhpdktr7kVp8HFm5yiRTWnumFVedl+ cNi5mMa6uVva6PGCzP8Kx6dMsLmJvrONH35xTL79pvf2Iod17q895270S0JRvytbACkW loiJtPLRTgRuOjYYlxEj2sjsEvps8kJZztE0pXbC+fR1IF7L7VKWUHmnKVUFGW9QQ2zN 2nuQ== X-Gm-Message-State: AOJu0YznrbLtBVaFM+pkSyu0EZzCK6RmYlhqi3MrpNXZewQS+zHA5N4S uOgpLqM3d4VgGFzO4bXhFZciEw== X-Received: by 2002:adf:fc4c:0:b0:31a:d4e1:ea30 with SMTP id e12-20020adffc4c000000b0031ad4e1ea30mr4139783wrs.17.1695996792502; Fri, 29 Sep 2023 07:13:12 -0700 (PDT) Received: from blmsp.fritz.box ([2001:4091:a246:8222:dbda:9cd9:39cc:f174]) by smtp.gmail.com with ESMTPSA id t25-20020a7bc3d9000000b00405391f485fsm1513068wmj.41.2023.09.29.07.13.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Sep 2023 07:13:12 -0700 (PDT) From: Markus Schneider-Pargmann <msp@baylibre.com> To: Marc Kleine-Budde <mkl@pengutronix.de>, Chandrasekar Ramakrishnan <rcsekar@samsung.com>, Wolfgang Grandegger <wg@grandegger.com> Cc: Vincent MAILHOL <mailhol.vincent@wanadoo.fr>, Simon Horman <simon.horman@corigine.com>, "David S . Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@google.com>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, linux-can@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Julien Panis <jpanis@baylibre.com>, Judith Mendez <jm@ti.com>, Markus Schneider-Pargmann <msp@baylibre.com> Subject: [PATCH v6 02/14] can: m_can: Move hrtimer init to m_can_class_register Date: Fri, 29 Sep 2023 16:12:52 +0200 Message-Id: <20230929141304.3934380-3-msp@baylibre.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230929141304.3934380-1-msp@baylibre.com> References: <20230929141304.3934380-1-msp@baylibre.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.8 required=5.0 tests=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]); Fri, 29 Sep 2023 07:13:43 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778386462994537436 X-GMAIL-MSGID: 1778386462994537436 |
Series |
can: m_can: Optimizations for m_can/tcan part 2
|
|
Commit Message
Markus Schneider-Pargmann
Sept. 29, 2023, 2:12 p.m. UTC
The hrtimer_init() is called in m_can_plat_probe() and the hrtimer
function is set in m_can_class_register(). For readability it is better
to keep these two together in m_can_class_register().
Cc: Judith Mendez <jm@ti.com>
Signed-off-by: Markus Schneider-Pargmann <msp@baylibre.com>
---
drivers/net/can/m_can/m_can.c | 6 +++++-
drivers/net/can/m_can/m_can_platform.c | 4 ----
2 files changed, 5 insertions(+), 5 deletions(-)
Comments
On Fri, Sep 29, 2023 at 04:12:52PM +0200, Markus Schneider-Pargmann wrote: > The hrtimer_init() is called in m_can_plat_probe() and the hrtimer > function is set in m_can_class_register(). For readability it is better > to keep these two together in m_can_class_register(). > > Cc: Judith Mendez <jm@ti.com> > Signed-off-by: Markus Schneider-Pargmann <msp@baylibre.com> Reviewed-by: Simon Horman <horms@kernel.org>
diff --git a/drivers/net/can/m_can/m_can.c b/drivers/net/can/m_can/m_can.c index 2395b1225cc8..45391492339e 100644 --- a/drivers/net/can/m_can/m_can.c +++ b/drivers/net/can/m_can/m_can.c @@ -2070,8 +2070,12 @@ int m_can_class_register(struct m_can_classdev *cdev) goto clk_disable; } - if (!cdev->net->irq) + if (!cdev->net->irq) { + dev_dbg(cdev->dev, "Polling enabled, initialize hrtimer"); + hrtimer_init(&cdev->hrtimer, CLOCK_MONOTONIC, + HRTIMER_MODE_REL_PINNED); cdev->hrtimer.function = &hrtimer_callback; + } ret = m_can_dev_setup(cdev); if (ret) diff --git a/drivers/net/can/m_can/m_can_platform.c b/drivers/net/can/m_can/m_can_platform.c index cdb28d6a092c..ab1b8211a61c 100644 --- a/drivers/net/can/m_can/m_can_platform.c +++ b/drivers/net/can/m_can/m_can_platform.c @@ -109,10 +109,6 @@ static int m_can_plat_probe(struct platform_device *pdev) ret = irq; goto probe_fail; } - } else { - dev_dbg(mcan_class->dev, "Polling enabled, initialize hrtimer"); - hrtimer_init(&mcan_class->hrtimer, CLOCK_MONOTONIC, - HRTIMER_MODE_REL_PINNED); } /* message ram could be shared */