From patchwork Wed Mar 15 11:05:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Markus Schneider-Pargmann X-Patchwork-Id: 70139 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp2266981wrd; Wed, 15 Mar 2023 04:19:37 -0700 (PDT) X-Google-Smtp-Source: AK7set+iN5f5kjeAQKQAbRugxRMWfI1PWZzqn7jlryMbmjkSax+0+cNcrzdOQ1zDx3PPTkKE3zJR X-Received: by 2002:a05:6a20:1614:b0:cc:aedf:9a1e with SMTP id l20-20020a056a20161400b000ccaedf9a1emr47651738pzj.61.1678879176749; Wed, 15 Mar 2023 04:19:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678879176; cv=none; d=google.com; s=arc-20160816; b=jrFM7QsxhWqSwDIoSMy7RygC/0yzd+bSti23sP6Jp45F8QO9dpHujC7zkCW+zGPNSz a7bvqSXcDKptzHrnNd06mx8ZO+Adb8riap8faY9Azg8ZhDYG4I60bv/fZM3hJD4U6h7A X1dwroNd6zg1xc9o95A/8XYnB/au0/brAJrCw6Lsv2b8OaklXN/+SE9gAj1pydk907nj yIHTXLquNBe7BadTn5Gnb07AyzUazLubIYjVKvlEqiR9htyl/xZiuqtpk7NOpR93DaMB CvqV1++9HKg3SJV0YyP5vPcv9FL61aI0iNpMqVuf9TzPiGsPdRzbqgCpcC8b2CEcd7GF ofHQ== 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=vPa68xqtezsL6sMRTVQ0tfny5rcXKUsYatwd7qGowxE=; b=gV27YbFPE5MZq0PUiNYmuBHZjobi8qeOm96CaTZc4McvEot7PUlAMHBgoscjoOdCDc /yxEasC3z0Q1bRo49fOdMIlBk4HBnu2bXNYmbuLbopxth/VLYTMmEnczj17+R6i/gF8r bv2T68IDC3J58WyyKYbWsMPwa9WJbYf3pO/uCJHaS9odtV0eiynhAFChLHWbWd3bO128 bGXubpS/OyCNq6lSNnA0WeG/ZSIy1JE+eu+vNMyVjMXi8r2wF4JGkd3+V+1I6YumbETF UXouHbeRvfqMFg8R9isFmZiRokOc2cKqZ75avUCAZbPAK15xxEvID5UCqF2maQmZvNUb 6GMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20210112.gappssmtp.com header.s=20210112 header.b=6WZgOzyy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a12-20020aa795ac000000b00608f52c3f20si4783266pfk.302.2023.03.15.04.19.19; Wed, 15 Mar 2023 04:19:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@baylibre-com.20210112.gappssmtp.com header.s=20210112 header.b=6WZgOzyy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231730AbjCOLGo (ORCPT + 99 others); Wed, 15 Mar 2023 07:06:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44114 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231513AbjCOLGh (ORCPT ); Wed, 15 Mar 2023 07:06:37 -0400 Received: from mail-wm1-x32a.google.com (mail-wm1-x32a.google.com [IPv6:2a00:1450:4864:20::32a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6BECC84F5D for ; Wed, 15 Mar 2023 04:06:27 -0700 (PDT) Received: by mail-wm1-x32a.google.com with SMTP id p13-20020a05600c358d00b003ed346d4522so676765wmq.2 for ; Wed, 15 Mar 2023 04:06:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; t=1678878386; 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=vPa68xqtezsL6sMRTVQ0tfny5rcXKUsYatwd7qGowxE=; b=6WZgOzyygg0zRDnl3x/YHL5WQkORuaTJ3lR0M74jAepA1G3LCh5lIi/ACzhN23kh6t DB+ETgEBdCDGDFCnDfn3UJVs6avbYkgcoKaSccEQ81OtapN79fKP0F/WPpFDUiKQyG6P /c7z4V6opxq/IodaPmKHbrA60YSsQE60iMQsV53eOC6rlGVvK3B2WN1l3p0OfLA4eVzN Qy2mNmBD7eYw4lPY/dAFHwoGRdr9CKiguskEkiqoCIbi1FgJJ/1dp/DI2M3z81VxhVbN Gb7VqWDnGcd/ZDQ0JxaYqBEDLrWJkiOMyhGj+zpULJC8v1D/R3D8WIboM9nepXMVC8dg rrEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678878386; 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=vPa68xqtezsL6sMRTVQ0tfny5rcXKUsYatwd7qGowxE=; b=cHOlQYJPy2MZjU/zELIYTwojEPBaCovYXdenzPFvC4y+cskfi4Wqa1GBJAHIVKhV2e t56sIeb6LkHhcK3sVen/MdYIUc7+ia3byC+SmMBLPOij/UpYPcQqJzo3nP9ljO5wyvmb RRCP0Ae7vQteOeO8iblzImWTB0+s7HXtfZBrPq7VVUfwk7nJ7PRBo6S/Y2nwdJLxOSmj vxQvLKnoAe6VoqUgl07loYuOciQHecq3KCTaDfv7V+ikkl1S9EQzZr0oaHnpDhEmARjR 51TKS5z3no/MJ6Do8dXJDE4JxkbsAacn62A8PrgVWdf/B2fO1sQ+JdQWPCkwoN4uJbb4 3xYQ== X-Gm-Message-State: AO0yUKWjz+mCG46L6UfOYd8J38bkM/gFDGYziEWzF8vQMZSNSfMltsrR 5/mk/n3dVrRvLp+pvMiOn3MbHA== X-Received: by 2002:a05:600c:548b:b0:3e2:6ec:61ea with SMTP id iv11-20020a05600c548b00b003e206ec61eamr17703012wmb.28.1678878385936; Wed, 15 Mar 2023 04:06:25 -0700 (PDT) Received: from blmsp.fritz.box ([2001:4090:a247:8056:be7d:83e:a6a5:4659]) by smtp.gmail.com with ESMTPSA id l4-20020a7bc444000000b003eafc47eb09sm1460563wmi.43.2023.03.15.04.06.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Mar 2023 04:06:25 -0700 (PDT) From: Markus Schneider-Pargmann To: Marc Kleine-Budde , Chandrasekar Ramakrishnan , Wolfgang Grandegger Cc: Vincent MAILHOL , Simon Horman , linux-can@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Markus Schneider-Pargmann Subject: [PATCH v3 01/16] can: m_can: Remove repeated check for is_peripheral Date: Wed, 15 Mar 2023 12:05:31 +0100 Message-Id: <20230315110546.2518305-2-msp@baylibre.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315110546.2518305-1-msp@baylibre.com> References: <20230315110546.2518305-1-msp@baylibre.com> MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,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 lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1760432411871209094?= X-GMAIL-MSGID: =?utf-8?q?1760432411871209094?= Merge both if-blocks to fix this. Signed-off-by: Markus Schneider-Pargmann Reviewed-by: Simon Horman --- drivers/net/can/m_can/m_can.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/net/can/m_can/m_can.c b/drivers/net/can/m_can/m_can.c index 8e83d6963d85..563625a701fc 100644 --- a/drivers/net/can/m_can/m_can.c +++ b/drivers/net/can/m_can/m_can.c @@ -1592,10 +1592,8 @@ static int m_can_close(struct net_device *dev) cdev->tx_skb = NULL; destroy_workqueue(cdev->tx_wq); cdev->tx_wq = NULL; - } - - if (cdev->is_peripheral) can_rx_offload_disable(&cdev->offload); + } close_candev(dev);