From patchwork Mon Jul 25 06:54:14 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 2245 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 026B83F046 for ; Mon, 25 Jul 2022 08:54:27 +0200 (CEST) Received: by mail-ed1-f69.google.com with SMTP id y2-20020a056402440200b0043bd6c898desf3880626eda.20 for ; Sun, 24 Jul 2022 23:54:27 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1658732066; cv=pass; d=google.com; s=arc-20160816; b=wrS2IxQDCDOnHo3tmziX+MxwiO4b+9hRP+qFEyzZNoIR2AX/arWJjCDwFsKonXdaEJ yhu1m7hWIcSiwlv8JWnzIVxb81S+pGH8AabKUDI3rix5vW9NyzCV27886pc5bYxcOZpO Hcxs5GdfUnFfPhrU9htTT6VBWaSHSeY19LkqqtpG6T1RlyRfVnMnVHT/o0J78HZu9FMB eh3wCPbSQSk7jDlQBNMrxV5BOEcRB2uo+b3nBvO+eJaJvW6waEGP6O88/vms4B2s4jsa rGQ3zXZ8n80K605sX9ob1ljMfviJjJo2LL2FYJpCxMgvB8tAb27qw32R/8+0eARr0yTL Piew== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=83+8uQnzQ43gNPUBEi0HzeWi1dwNVUmEc4xZIx0NzBc=; b=kz3RAbVtNYlnpdsyR9bUUnrKOrjkIUeUuyKc+WG71hMmcCYRJP8iDNdQpG9mZ+TzvH fru9VYh5QTdDi/y5yj5tMc88By3uVzNtwAaTa6/tQbmnd4+OoDBwRAL7/wYdz+Ce4tJN CeIrn1Ngj1Ep6OvTu8u0aiTPZWB4FVxQpFdirOfFg1RMe103XSVM4U+ju62VFKck3ste /pCM+hFB4nGcjhMh555tALXp61l08MFN+ZcUnF82teop2frbO+PkMz1kBOfSDhYl3JOa FfYXbCfQkMIDV/V3zaEJ3lGYeVzVH+t8LHjQ9WrSj0rOA3QhfSZue3Yl9oXTMT9pxsM1 8e3g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=DDAXmyNU; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=83+8uQnzQ43gNPUBEi0HzeWi1dwNVUmEc4xZIx0NzBc=; b=IzCZTixVsXWxHW2Rtp+Csbnz8LmW49PexH2oLsy5oIOxwlyr5ngXa1/DSLebkiNzV5 80THhiVlT9CvAliGyV70nAXV6J2cAkf7CUuDYsSTsZuu5LTUEf7QETih7Oddn9PnvUpt +HZLZ4g2u6l56IigZfHj1Li9xwmiUDPUH9F70= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=83+8uQnzQ43gNPUBEi0HzeWi1dwNVUmEc4xZIx0NzBc=; b=megmNNDLs6mttJ7XORFqM9bKuLIKTzHJ2aBkwYK1380nZoEJLkC9kAI+9rPC3VoGQT VMVxVygSwXlKBZqkP/fS60JJq+L+zA67/WzzGC9cymsgO88phjWMywQLsU2ORzyUmplP r/kjw5GnUMiNzooCR5L42kxzCL3ohIAkKvck2BGela0/4MGxdP4O+3CGQD+yovaPsLJ8 ugZXZzkLeEvCPSDDDDFnvTu2z3dLQaEVkGgTqljSEIp7xbJ8/B/7Oxf2/6zrtftrR8NQ OCywA0d5gyvCkYGIcLEa4PjKhYRet9bgXZxN8IAgqupAIJ8UZcI8GCcYyCuB9mud0/H4 0OLw== X-Gm-Message-State: AJIora/kx8b/3Eldtp0VZp8PFJQ/O7rtTFAKJqWUrGimgWUkGTY8ebns BSMXSrFg2NS0QVGW/bzmEBU/wXSg X-Google-Smtp-Source: AGRyM1sG1+aFpu/5pHDV/wkGwngp8i1I8xUgxjQWqS+suRkC/CP3//2Si0qBg0qQBjb1+N0NGh7qbA== X-Received: by 2002:a17:906:cc4a:b0:72b:863e:ef7c with SMTP id mm10-20020a170906cc4a00b0072b863eef7cmr8782574ejb.686.1658732066829; Sun, 24 Jul 2022 23:54:26 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:6402:40c6:b0:43a:7c1c:8981 with SMTP id z6-20020a05640240c600b0043a7c1c8981ls3549061edb.0.-pod-prod-gmail; Sun, 24 Jul 2022 23:54:25 -0700 (PDT) X-Received: by 2002:a05:6402:190e:b0:43a:e914:8c11 with SMTP id e14-20020a056402190e00b0043ae9148c11mr11386794edz.281.1658732065691; Sun, 24 Jul 2022 23:54:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658732065; cv=none; d=google.com; s=arc-20160816; b=I0RGEeeuWSTCTkNSkj+qemCXlRTlnhLWRuRvB87yFZC8th+AoYvwVqSQ/iKDaQn2SV fjdub4Re2StNWFECnWNODrmvGsJ41cGTlmnoBPdya/pTE8B7rXxUqm1upcQuKB4mjESt r2V5uYss5K89GHEL+5fp5zuXdu+hrMzGFK3zi3dYtDq39AQ80gqE7BWKcr++6Otw2vkK eFpOtpf2pOKdkckhE2L2ul4vT/XNbFR3PQ62FY/CRKQZ0duQG4FeeCqQUij3phREzktz LR+FxXLpr7HIXXZx2JWgb0yRDDDq2b4uYi0mI2rxWJYf3E+5UE6kGlXyDmZKczwClQns hd/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=qsO3FO8JgkL2eEGAFz/IqcQFBC6RPDGVM/v5Nl88GZc=; b=xH0cBF52vKRRqdp1sghFYcOKfBbrk0rvj6GtsGPr+9NlIuROeU0I7P5UUx6K9FzvS3 gjTS+svgM/AbtL05juJX8qUtm+Q1mJPIzwsbDlLp/ui4Kcglv2cwBOmOH0Y1+JLMjYzJ U4aB0fgifZm+aCinJE3yFfUskrZ/+6SQ2foT44fLKz/4GbrFCiWGOJbF3ttNEvWtaJNJ t+eKSdjGotjKrdWnm8DJk1kVcaq6dAaY7oPuphNcO68Arlaz1ct7iP8jxaxvHuoYR3cw J2u3CnRsOmm3BPYkmCjSb+dmcGSnMhGJzPpIULHw4geSK5xNgktYGMGxvwCBgkaLGNGg HpSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=DDAXmyNU; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id u4-20020a170906950400b00722d7688504sor3663869ejx.105.2022.07.24.23.54.25 for (Google Transport Security); Sun, 24 Jul 2022 23:54:25 -0700 (PDT) Received-SPF: pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; X-Received: by 2002:a17:906:9b95:b0:72f:c504:45e with SMTP id dd21-20020a1709069b9500b0072fc504045emr7913376ejc.345.1658732065462; Sun, 24 Jul 2022 23:54:25 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.homenet.telecomitalia.it (host-87-14-98-67.retail.telecomitalia.it. [87.14.98.67]) by smtp.gmail.com with ESMTPSA id r2-20020a1709060d4200b00722e57fa051sm4967711ejh.90.2022.07.24.23.54.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Jul 2022 23:54:24 -0700 (PDT) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: michael@amarulasolutions.com, Amarula patchwork , Jeroen Hofstee , Oliver Hartkopp , Dario Binacchi , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Marc Kleine-Budde , Paolo Abeni , Wolfgang Grandegger , linux-can@vger.kernel.org, netdev@vger.kernel.org Subject: [PATCH v2 1/6] can: slcan: remove useless header inclusions Date: Mon, 25 Jul 2022 08:54:14 +0200 Message-Id: <20220725065419.3005015-2-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220725065419.3005015-1-dario.binacchi@amarulasolutions.com> References: <20220725065419.3005015-1-dario.binacchi@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: dario.binacchi@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=DDAXmyNU; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Include only the necessary headers. Signed-off-by: Dario Binacchi --- Changes in v2: - Re-add headers that export at least one symbol used by the module. drivers/net/can/slcan/slcan-core.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/net/can/slcan/slcan-core.c b/drivers/net/can/slcan/slcan-core.c index dfd1baba4130..c3dd7468a066 100644 --- a/drivers/net/can/slcan/slcan-core.c +++ b/drivers/net/can/slcan/slcan-core.c @@ -46,9 +46,6 @@ #include #include #include -#include -#include -#include #include #include #include From patchwork Mon Jul 25 06:54:15 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 2246 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-ej1-f72.google.com (mail-ej1-f72.google.com [209.85.218.72]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 9D0753F046 for ; Mon, 25 Jul 2022 08:54:28 +0200 (CEST) Received: by mail-ej1-f72.google.com with SMTP id hb41-20020a170907162900b0072f044ca263sf2807980ejc.15 for ; Sun, 24 Jul 2022 23:54:28 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1658732068; cv=pass; d=google.com; s=arc-20160816; b=LDqR7Q/hiR2P04v5lrkNeSabYECSBsZW8QqouoQk//Avt0NO3OvCjXy/Ipe+gMLzLR Xw/wPIeNM/N7v8sgw8PYlHpnr49NqwIQ2dtNu9DDpWORETNwZMBmQoBGNLjzZdolZcSr 7KtPaqtYJFq77D98KNXPdvCzyIPCME0yn7DRlzqQVE4ZT4/hdwmXu74TLv8DJUFGm3b1 3a7Wpt5FIU9fqoIk33t9Wehb0riBu69c91bbt8WXqfUBBDjWzRIFZZ/qSLOQKcC/7n5Y pmvyPqhrby4goixg8VtvkKiYHZ8QjJiZb4I9NkEXff6vFn+hxYizIW8SSHhTlBjNBBBD mVwg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=mQ0knfNp8CSx6myraqHsnH6Wam47B3q1RqWYbmfypkE=; b=AwOsj3B32GMxiBW97RlPDwO/NuDsaSu2rQoO4xw8FphtnBXkCK0Q31aRDmYeMnicKD NiwA6+B4Uoaksx/SWgvk5/c4ZgFYIbTNPVC539JIQU6CD0fF0msOiiaOSuT4poF6DCWJ 373XcEQpI3Q0nDmYrIurQhy13CJ5VRryizlzubPN/WRdbzx5RX7rX6asSAL3Uy44bTrn Xo3FIXWmwuvq8FQId4AiItwvYbDCFXyaA1tu9yTonDV2TVrvgQRBFQFvmHh6s/ZTYHGT Od9YtLav9LnXiLe1pSzeEUYpXvemhyTeRcryZOcdbiY0RTKcsCZ4pHyqgQXVngeASKLg mtKA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="Vw/fuY3u"; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=mQ0knfNp8CSx6myraqHsnH6Wam47B3q1RqWYbmfypkE=; b=OA2LiabY9IEheWKh+dsoBo3AFGqaLpv12F0XIlLhDvKv2VHqYfT0ipwNw/cnBxg9ts QwWO6doq6omxNnfFITmwIdB8HQs1IhdmSUQE9FYGCHDVhH2E3r82yWWMy2BsOdsttLRj Th2syhfMjzCPzlLEknDC5Dm9QddYQXIHorYW8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=mQ0knfNp8CSx6myraqHsnH6Wam47B3q1RqWYbmfypkE=; b=CqTAgYxWFpi3i2B1Bk8CjG8WsBBn36HNtnt6S6lwi9+VT2bZczFhlmMrOPDNK4yDz9 QVfdFSsilBKf9tFGRCGhFIAhieAImGgcK2/s7auKYivnGKn+saTQBNmmCiaMGvUPR8xl oi9XXrk9rBQbCAIrZHEwJP5OF6RmfBKA+N6JyjyzR/D0RxBuyLgNEUbJJI7pmBjhH3KK 9pXAIOfOSaxdwpl3spp1j4dICySaBHNofVVGeZbHAKBoemq/76pTkz+f4D6I+hVyOifK IaFCRf0VA7QIFP52fP8P83Ucn9I91ijwwyumUAiPKRSL6DIDYT28Sf4KBLM1VYWm+ziZ /9GA== X-Gm-Message-State: AJIora/ev41r+pTTYhIkslw9au9hpLIEB/6FtcvWbVnh2kMLsXP0TN5d kyeXqJxcW4blajWFdP/ARlIHz0Zt X-Google-Smtp-Source: AGRyM1tgYKagUFtOb4xY9tdZoUa5w25n2SSnUm3JL8NcMCImBPxIaMgfcu+jHT0MiKacZp9HxWYvLw== X-Received: by 2002:a17:907:2bf1:b0:72b:5cc3:79cf with SMTP id gv49-20020a1709072bf100b0072b5cc379cfmr9245448ejc.382.1658732068446; Sun, 24 Jul 2022 23:54:28 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:906:80c:b0:72b:cf5:145f with SMTP id e12-20020a170906080c00b0072b0cf5145fls1662018ejd.5.-pod-prod-gmail; Sun, 24 Jul 2022 23:54:27 -0700 (PDT) X-Received: by 2002:a17:906:9b14:b0:72b:313b:2df4 with SMTP id eo20-20020a1709069b1400b0072b313b2df4mr8631648ejc.99.1658732067315; Sun, 24 Jul 2022 23:54:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658732067; cv=none; d=google.com; s=arc-20160816; b=a473A2hUjoFzxVNq/3b15yrssr7Bg0MC6YLpcsqw92qLb/FeamKnxaZ/acCjPM4xsX SPSvGQH5tIjyZPllVS40y9Bbea4lA6EeWeJ/Yai06egp3Dzp2sDGeUm7yeqoQ+nKSTUA TrP9R9gwT68JKZP7HaaDfqnBU0h3SZMT4sQqMmCiSBgnArao24PxBN0/XQ0E2ktVk7cU MmzzRFNXmjIaRuW0gkd+aQ22hFFwojUv9ErNrudHt6brW6EGmDdwzxpjW/KVng3n6XTr EXNUTihpuJggnHHjIHnB7mYlLzrB0R0A40gPW3cFPDzsVEsssL492RwxJXjQiWN04d/E hCCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=oX2R4w1wEhycH7uORVP6P9jgeQIkVPnZpKFdAOjlClo=; b=nhcWbgMnCRLNoW0qf7oiJpPWh5Eo5wpgu2/KziBbocztryVVX6ADXlVeu1HqkzRTvV miHzVnxM+A4ql2e7oQlXievh0EpXiOZuWcqG/3TnIwa7g5vb4P2Tkg6DlwPhRHaEuoM7 MBynwVFly2ht/NDBvNg9aa46cBO2Rvgz7bFsyu/VejogEWG/CFKbvA22zy1Zlba4zFvB Og0cxKmjzuvLVrTgUTbsQbj99YgNzWXQW1jFW2aGqUy769BqD7ATebRcJoigLiYEILM9 CK6p2dYW96z3Xr9eEC2FZvMeux7cEuJFtxf9hIbt6o1bCIhZXZFR74wsCAANYcJFmB/x ftQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="Vw/fuY3u"; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id x17-20020a170906135100b00722e8a7290dsor3927427ejb.19.2022.07.24.23.54.27 for (Google Transport Security); Sun, 24 Jul 2022 23:54:27 -0700 (PDT) Received-SPF: pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; X-Received: by 2002:a17:906:58c9:b0:72f:4646:1f6f with SMTP id e9-20020a17090658c900b0072f46461f6fmr9049659ejs.181.1658732066866; Sun, 24 Jul 2022 23:54:26 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.homenet.telecomitalia.it (host-87-14-98-67.retail.telecomitalia.it. [87.14.98.67]) by smtp.gmail.com with ESMTPSA id r2-20020a1709060d4200b00722e57fa051sm4967711ejh.90.2022.07.24.23.54.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Jul 2022 23:54:26 -0700 (PDT) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: michael@amarulasolutions.com, Amarula patchwork , Jeroen Hofstee , Oliver Hartkopp , Dario Binacchi , Max Staudt , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Marc Kleine-Budde , Paolo Abeni , Wolfgang Grandegger , linux-can@vger.kernel.org, netdev@vger.kernel.org Subject: [PATCH v2 2/6] can: slcan: remove legacy infrastructure Date: Mon, 25 Jul 2022 08:54:15 +0200 Message-Id: <20220725065419.3005015-3-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220725065419.3005015-1-dario.binacchi@amarulasolutions.com> References: <20220725065419.3005015-1-dario.binacchi@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: dario.binacchi@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="Vw/fuY3u"; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Taking inspiration from the drivers/net/can/can327.c driver and at the suggestion of its author Max Staudt, I removed legacy stuff like `SLCAN_MAGIC' and `slcan_devs' resulting in simplification of the code and its maintainability. The use of slcan_devs is derived from a very old kernel, since slip.c is about 30 years old, so today's kernel allows us to remove it. The .hangup() ldisc function, which only called the ldisc .close(), has been removed since the ldisc layer calls .close() in a good place anyway. The old slcanX name has been dropped in order to use the standard canX interface naming. It has been assumed that this change does not break the user space as the slcan driver provides an ioctl to resolve from tty fd to netdev name. The `maxdev' module parameter has also been removed. CC: Max Staudt Signed-off-by: Dario Binacchi --- Changes in v2: - Update the commit description. - Drop the old "slcan" name to use the standard canX interface naming. drivers/net/can/slcan/slcan-core.c | 318 ++++++----------------------- 1 file changed, 63 insertions(+), 255 deletions(-) diff --git a/drivers/net/can/slcan/slcan-core.c b/drivers/net/can/slcan/slcan-core.c index c3dd7468a066..2c546f4a7981 100644 --- a/drivers/net/can/slcan/slcan-core.c +++ b/drivers/net/can/slcan/slcan-core.c @@ -1,11 +1,14 @@ /* * slcan.c - serial line CAN interface driver (using tty line discipline) * - * This file is derived from linux/drivers/net/slip/slip.c + * This file is derived from linux/drivers/net/slip/slip.c and got + * inspiration from linux/drivers/net/can/can327.c for the rework made + * on the line discipline code. * * slip.c Authors : Laurence Culhane * Fred N. van Kempen * slcan.c Author : Oliver Hartkopp + * can327.c Author : Max Staudt * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -36,7 +39,6 @@ */ #include -#include #include #include @@ -46,7 +48,6 @@ #include #include #include -#include #include #include #include @@ -61,15 +62,6 @@ MODULE_DESCRIPTION("serial line CAN interface"); MODULE_LICENSE("GPL"); MODULE_AUTHOR("Oliver Hartkopp "); -#define SLCAN_MAGIC 0x53CA - -static int maxdev = 10; /* MAX number of SLCAN channels; - * This can be overridden with - * insmod slcan.ko maxdev=nnn - */ -module_param(maxdev, int, 0); -MODULE_PARM_DESC(maxdev, "Maximum number of slcan interfaces"); - /* maximum rx buffer len: extended CAN frame with timestamp */ #define SLC_MTU (sizeof("T1111222281122334455667788EA5F\r") + 1) @@ -83,7 +75,6 @@ MODULE_PARM_DESC(maxdev, "Maximum number of slcan interfaces"); SLC_STATE_BE_TXCNT_LEN) struct slcan { struct can_priv can; - int magic; /* Various fields. */ struct tty_struct *tty; /* ptr to TTY structure */ @@ -99,17 +90,14 @@ struct slcan { int xleft; /* bytes left in XMIT queue */ unsigned long flags; /* Flag values/ mode etc */ -#define SLF_INUSE 0 /* Channel in use */ -#define SLF_ERROR 1 /* Parity, etc. error */ -#define SLF_XCMD 2 /* Command transmission */ +#define SLF_ERROR 0 /* Parity, etc. error */ +#define SLF_XCMD 1 /* Command transmission */ unsigned long cmd_flags; /* Command flags */ #define CF_ERR_RST 0 /* Reset errors on open */ wait_queue_head_t xcmd_wait; /* Wait queue for commands */ /* transmission */ }; -static struct net_device **slcan_devs; - static const u32 slcan_bitrate_const[] = { 10000, 20000, 50000, 100000, 125000, 250000, 500000, 800000, 1000000 @@ -553,9 +541,8 @@ static void slcan_transmit(struct work_struct *work) spin_lock_bh(&sl->lock); /* First make sure we're connected. */ - if (!sl->tty || sl->magic != SLCAN_MAGIC || - (unlikely(!netif_running(sl->dev)) && - likely(!test_bit(SLF_XCMD, &sl->flags)))) { + if (unlikely(!netif_running(sl->dev)) && + likely(!test_bit(SLF_XCMD, &sl->flags))) { spin_unlock_bh(&sl->lock); return; } @@ -590,13 +577,9 @@ static void slcan_transmit(struct work_struct *work) */ static void slcan_write_wakeup(struct tty_struct *tty) { - struct slcan *sl; + struct slcan *sl = (struct slcan *)tty->disc_data; - rcu_read_lock(); - sl = rcu_dereference(tty->disc_data); - if (sl) - schedule_work(&sl->tx_work); - rcu_read_unlock(); + schedule_work(&sl->tx_work); } /* Send a can_frame to a TTY queue. */ @@ -667,25 +650,21 @@ static int slc_close(struct net_device *dev) struct slcan *sl = netdev_priv(dev); int err; - spin_lock_bh(&sl->lock); - if (sl->tty) { - if (sl->can.bittiming.bitrate && - sl->can.bittiming.bitrate != CAN_BITRATE_UNKNOWN) { - spin_unlock_bh(&sl->lock); - err = slcan_transmit_cmd(sl, "C\r"); - spin_lock_bh(&sl->lock); - if (err) - netdev_warn(dev, - "failed to send close command 'C\\r'\n"); - } - - /* TTY discipline is running. */ - clear_bit(TTY_DO_WRITE_WAKEUP, &sl->tty->flags); + if (sl->can.bittiming.bitrate && + sl->can.bittiming.bitrate != CAN_BITRATE_UNKNOWN) { + err = slcan_transmit_cmd(sl, "C\r"); + if (err) + netdev_warn(dev, + "failed to send close command 'C\\r'\n"); } + + /* TTY discipline is running. */ + clear_bit(TTY_DO_WRITE_WAKEUP, &sl->tty->flags); + flush_work(&sl->tx_work); + netif_stop_queue(dev); sl->rcount = 0; sl->xleft = 0; - spin_unlock_bh(&sl->lock); close_candev(dev); sl->can.state = CAN_STATE_STOPPED; if (sl->can.bittiming.bitrate == CAN_BITRATE_UNKNOWN) @@ -701,9 +680,6 @@ static int slc_open(struct net_device *dev) unsigned char cmd[SLC_MTU]; int err, s; - if (!sl->tty) - return -ENODEV; - /* The baud rate is not set with the command * `ip link set type can bitrate ' and therefore * can.bittiming.bitrate is CAN_BITRATE_UNSET (0), causing @@ -718,8 +694,6 @@ static int slc_open(struct net_device *dev) return err; } - sl->flags &= BIT(SLF_INUSE); - if (sl->can.bittiming.bitrate != CAN_BITRATE_UNKNOWN) { for (s = 0; s < ARRAY_SIZE(slcan_bitrate_const); s++) { if (sl->can.bittiming.bitrate == slcan_bitrate_const[s]) @@ -763,14 +737,6 @@ static int slc_open(struct net_device *dev) return err; } -static void slc_dealloc(struct slcan *sl) -{ - int i = sl->dev->base_addr; - - free_candev(sl->dev); - slcan_devs[i] = NULL; -} - static int slcan_change_mtu(struct net_device *dev, int new_mtu) { return -EINVAL; @@ -800,7 +766,7 @@ static void slcan_receive_buf(struct tty_struct *tty, { struct slcan *sl = (struct slcan *)tty->disc_data; - if (!sl || sl->magic != SLCAN_MAGIC || !netif_running(sl->dev)) + if (!netif_running(sl->dev)) return; /* Read the characters out of the buffer */ @@ -815,80 +781,15 @@ static void slcan_receive_buf(struct tty_struct *tty, } } -/************************************ - * slcan_open helper routines. - ************************************/ - -/* Collect hanged up channels */ -static void slc_sync(void) -{ - int i; - struct net_device *dev; - struct slcan *sl; - - for (i = 0; i < maxdev; i++) { - dev = slcan_devs[i]; - if (!dev) - break; - - sl = netdev_priv(dev); - if (sl->tty) - continue; - if (dev->flags & IFF_UP) - dev_close(dev); - } -} - -/* Find a free SLCAN channel, and link in this `tty' line. */ -static struct slcan *slc_alloc(void) -{ - int i; - struct net_device *dev = NULL; - struct slcan *sl; - - for (i = 0; i < maxdev; i++) { - dev = slcan_devs[i]; - if (!dev) - break; - } - - /* Sorry, too many, all slots in use */ - if (i >= maxdev) - return NULL; - - dev = alloc_candev(sizeof(*sl), 1); - if (!dev) - return NULL; - - snprintf(dev->name, sizeof(dev->name), "slcan%d", i); - dev->netdev_ops = &slc_netdev_ops; - dev->base_addr = i; - slcan_set_ethtool_ops(dev); - sl = netdev_priv(dev); - - /* Initialize channel control data */ - sl->magic = SLCAN_MAGIC; - sl->dev = dev; - sl->can.bitrate_const = slcan_bitrate_const; - sl->can.bitrate_const_cnt = ARRAY_SIZE(slcan_bitrate_const); - spin_lock_init(&sl->lock); - INIT_WORK(&sl->tx_work, slcan_transmit); - init_waitqueue_head(&sl->xcmd_wait); - slcan_devs[i] = dev; - - return sl; -} - /* Open the high-level part of the SLCAN channel. * This function is called by the TTY module when the - * SLCAN line discipline is called for. Because we are - * sure the tty line exists, we only have to link it to - * a free SLCAN channel... + * SLCAN line discipline is called for. * * Called in process context serialized from other ldisc calls. */ static int slcan_open(struct tty_struct *tty) { + struct net_device *dev; struct slcan *sl; int err; @@ -898,72 +799,49 @@ static int slcan_open(struct tty_struct *tty) if (!tty->ops->write) return -EOPNOTSUPP; - /* RTnetlink lock is misused here to serialize concurrent - * opens of slcan channels. There are better ways, but it is - * the simplest one. - */ - rtnl_lock(); + dev = alloc_candev(sizeof(*sl), 1); + if (!dev) + return -ENFILE; - /* Collect hanged up channels. */ - slc_sync(); + sl = netdev_priv(dev); - sl = tty->disc_data; + /* Configure TTY interface */ + tty->receive_room = 65536; /* We don't flow control */ + sl->rcount = 0; + sl->xleft = 0; + spin_lock_init(&sl->lock); + INIT_WORK(&sl->tx_work, slcan_transmit); + init_waitqueue_head(&sl->xcmd_wait); - err = -EEXIST; - /* First make sure we're not already connected. */ - if (sl && sl->magic == SLCAN_MAGIC) - goto err_exit; + /* Configure CAN metadata */ + sl->can.bitrate_const = slcan_bitrate_const; + sl->can.bitrate_const_cnt = ARRAY_SIZE(slcan_bitrate_const); - /* OK. Find a free SLCAN channel to use. */ - err = -ENFILE; - sl = slc_alloc(); - if (!sl) - goto err_exit; + /* Configure netdev interface */ + sl->dev = dev; + dev->netdev_ops = &slc_netdev_ops; + slcan_set_ethtool_ops(dev); + /* Mark ldisc channel as alive */ sl->tty = tty; tty->disc_data = sl; - if (!test_bit(SLF_INUSE, &sl->flags)) { - /* Perform the low-level SLCAN initialization. */ - sl->rcount = 0; - sl->xleft = 0; - - set_bit(SLF_INUSE, &sl->flags); - - rtnl_unlock(); - err = register_candev(sl->dev); - if (err) { - pr_err("slcan: can't register candev\n"); - goto err_free_chan; - } - } else { - rtnl_unlock(); + err = register_candev(dev); + if (err) { + free_candev(dev); + pr_err("slcan: can't register candev\n"); + return err; } - tty->receive_room = 65536; /* We don't flow control */ - + netdev_info(dev, "slcan on %s.\n", tty->name); /* TTY layer expects 0 on success */ return 0; - -err_free_chan: - rtnl_lock(); - sl->tty = NULL; - tty->disc_data = NULL; - clear_bit(SLF_INUSE, &sl->flags); - slc_dealloc(sl); - rtnl_unlock(); - return err; - -err_exit: - rtnl_unlock(); - - /* Count references from TTY module */ - return err; } /* Close down a SLCAN channel. * This means flushing out any pending queues, and then returning. This * call is serialized against other ldisc functions. + * Once this is called, no other ldisc function of ours is entered. * * We also use this method for a hangup event. */ @@ -971,28 +849,20 @@ static void slcan_close(struct tty_struct *tty) { struct slcan *sl = (struct slcan *)tty->disc_data; - /* First make sure we're connected. */ - if (!sl || sl->magic != SLCAN_MAGIC || sl->tty != tty) - return; + /* unregister_netdev() calls .ndo_stop() so we don't have to. + * Our .ndo_stop() also flushes the TTY write wakeup handler, + * so we can safely set sl->tty = NULL after this. + */ + unregister_candev(sl->dev); + /* Mark channel as dead */ spin_lock_bh(&sl->lock); - rcu_assign_pointer(tty->disc_data, NULL); + tty->disc_data = NULL; sl->tty = NULL; spin_unlock_bh(&sl->lock); - synchronize_rcu(); - flush_work(&sl->tx_work); - - slc_close(sl->dev); - unregister_candev(sl->dev); - rtnl_lock(); - slc_dealloc(sl); - rtnl_unlock(); -} - -static void slcan_hangup(struct tty_struct *tty) -{ - slcan_close(tty); + netdev_info(sl->dev, "slcan off %s.\n", tty->name); + free_candev(sl->dev); } /* Perform I/O control on an active SLCAN channel. */ @@ -1002,10 +872,6 @@ static int slcan_ioctl(struct tty_struct *tty, unsigned int cmd, struct slcan *sl = (struct slcan *)tty->disc_data; unsigned int tmp; - /* First make sure we're connected. */ - if (!sl || sl->magic != SLCAN_MAGIC) - return -EINVAL; - switch (cmd) { case SIOCGIFNAME: tmp = strlen(sl->dev->name) + 1; @@ -1027,7 +893,6 @@ static struct tty_ldisc_ops slc_ldisc = { .name = "slcan", .open = slcan_open, .close = slcan_close, - .hangup = slcan_hangup, .ioctl = slcan_ioctl, .receive_buf = slcan_receive_buf, .write_wakeup = slcan_write_wakeup, @@ -1037,78 +902,21 @@ static int __init slcan_init(void) { int status; - if (maxdev < 4) - maxdev = 4; /* Sanity */ - pr_info("slcan: serial line CAN interface driver\n"); - pr_info("slcan: %d dynamic interface channels.\n", maxdev); - - slcan_devs = kcalloc(maxdev, sizeof(struct net_device *), GFP_KERNEL); - if (!slcan_devs) - return -ENOMEM; /* Fill in our line protocol discipline, and register it */ status = tty_register_ldisc(&slc_ldisc); - if (status) { + if (status) pr_err("slcan: can't register line discipline\n"); - kfree(slcan_devs); - } + return status; } static void __exit slcan_exit(void) { - int i; - struct net_device *dev; - struct slcan *sl; - unsigned long timeout = jiffies + HZ; - int busy = 0; - - if (!slcan_devs) - return; - - /* First of all: check for active disciplines and hangup them. - */ - do { - if (busy) - msleep_interruptible(100); - - busy = 0; - for (i = 0; i < maxdev; i++) { - dev = slcan_devs[i]; - if (!dev) - continue; - sl = netdev_priv(dev); - spin_lock_bh(&sl->lock); - if (sl->tty) { - busy++; - tty_hangup(sl->tty); - } - spin_unlock_bh(&sl->lock); - } - } while (busy && time_before(jiffies, timeout)); - - /* FIXME: hangup is async so we should wait when doing this second - * phase + /* This will only be called when all channels have been closed by + * userspace - tty_ldisc.c takes care of the module's refcount. */ - - for (i = 0; i < maxdev; i++) { - dev = slcan_devs[i]; - if (!dev) - continue; - - sl = netdev_priv(dev); - if (sl->tty) - netdev_err(dev, "tty discipline still running\n"); - - slc_close(dev); - unregister_candev(dev); - slc_dealloc(sl); - } - - kfree(slcan_devs); - slcan_devs = NULL; - tty_unregister_ldisc(&slc_ldisc); } From patchwork Mon Jul 25 06:54:16 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 2247 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-ej1-f71.google.com (mail-ej1-f71.google.com [209.85.218.71]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id B485C3F046 for ; Mon, 25 Jul 2022 08:54:29 +0200 (CEST) Received: by mail-ej1-f71.google.com with SMTP id gb37-20020a170907962500b0072b820af09dsf2817893ejc.20 for ; Sun, 24 Jul 2022 23:54:29 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1658732069; cv=pass; d=google.com; s=arc-20160816; b=VPwnESsUkk4g9DJXMtPlsPAQ/uhK051bmaGBqhSzokEK2d9aOK5abB80Lza358W9cX KohXsw0boLjYyQDL0ZVbVaBKDU33ZUuvak44dQvONYKgapqAhRpGf33oSEKdlWpWDCrO LQK0A4yoUsgmGIaeeipzLvi4/4njI44qs5gTMo2qKZ2Kc7vYDvIRJqwOaPRQ5qTkVcXy JjWFMNsQTBxfQ1ozH+0UVVaNWN2vjXUmC5MzJb+/QoTUGurLYZITFJWr16xX25dx3dWG f0md5zUbiBruTrdxX9dy9oSdz4wwwH1HZ+Vy1Et1U4biE6xnlqitGJkVEyBkFg2sUPmT Zqag== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=u22c2jOQynux3qqU1N58bwbU1UfKshYuyb1s3zc9F0c=; b=aztbcqXGHBISc1FIzkZDVfBmdQEnGcThZ2DxMIJuBzqx83bTN8gltqncGqZNXwr25b ieuFPc1NlL7FLFQP4olUaraKiOxkoQPd+jMSE0yYth7VCczHu3rtcoad50NuqGQQI2ix UviXsRUnE8eYs7Q6MRiLdjFEDRa408tGDHys9BEhOSJqt599FnBEc+Btk6gs8NuyDVGH Ju98xgCnjEt9VoUbeAwzJmHtVRI4x4YsWfIuVol2Vj2Qb9fcf0hE8Ecl13j36JYT041a CLWUFUH7vTLX0JMkC5gKtOKcmtYIsEiR7+c0m+PQSllxoCdMWAN3aX+7zBnqB9PW5TZu DgPQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=BLx3Ps5a; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=u22c2jOQynux3qqU1N58bwbU1UfKshYuyb1s3zc9F0c=; b=Nud6mhnNZTOZb+jIbyGqgQlcF6y+jkEyu0AVR28IIen33UgGUPDSv84V6xI9hCWGhR tKK+uhlEt4kSjsfHH1KJ63cVIjy/PmAb0sOThePcqFwiVXPRttvWYdxQ4ZaJK3LYlg5e YsPOWywIkWiXn0TfvYKCU6B/IblAZfFLwFVIg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=u22c2jOQynux3qqU1N58bwbU1UfKshYuyb1s3zc9F0c=; b=cHN1gwwyGTA4eewqraVtus34VdKj05bG8buTpxq681S3PVCv52TNoZGnVLKxE+0PuQ pfC1iHTUOgIwjVCS2ZsT6bsyVa7ba04xjb63MMUgASOAYky8xp+J5P2+HpbkTk1X1SJX l/6+GWd5oECaq3RBvCaRKJznOwyh9dtWJMqFq5QTgSqsbOEhQhMENpjleRuFDhy4lF4Q ktUBqc3N1OK4iXNwavngVN0m9B1RB3cLv+9AOy4hYZLsYrjiZyXQlfI0K0Dz7e9P9mgC G5rLFoTIkLIcDSOCh3IMUH05peYq5yaCiTwTSW12pTkMCNsXfmZU218VaYe1aUAU+G4x YXRQ== X-Gm-Message-State: AJIora8mR9kg9m9TqJoISpjWesf/s5EkZ6iYVdmE56BqQQCt2guea87W 0d+0GTB8SIQc14DBvqai97FaEMHp X-Google-Smtp-Source: AGRyM1s3PF8Lxdg+lOZJFq4qJ2aXWMs1WbGXoWAXMRkSOlAgdt5dsS663k/KnEDq8ULpkvAZ22Rxqg== X-Received: by 2002:a17:907:7ba6:b0:72b:44ff:7282 with SMTP id ne38-20020a1709077ba600b0072b44ff7282mr9050512ejc.652.1658732069583; Sun, 24 Jul 2022 23:54:29 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:6402:40c6:b0:43a:7c1c:8981 with SMTP id z6-20020a05640240c600b0043a7c1c8981ls3549151edb.0.-pod-prod-gmail; Sun, 24 Jul 2022 23:54:28 -0700 (PDT) X-Received: by 2002:a05:6402:540c:b0:434:d965:f8a with SMTP id ev12-20020a056402540c00b00434d9650f8amr11805981edb.30.1658732068573; Sun, 24 Jul 2022 23:54:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658732068; cv=none; d=google.com; s=arc-20160816; b=IcoX2MYwHQ7anTBS8ZnqNq7sI7ogKykm6cwo2fe/G9MSart26hGJpy56+dQ0Pa7Vgs WHsCEMcnn6Zkd73ZI6KcIvweaGDCBwhL1PIh1aRM7DanP+55XCt5WHgkUIB8fekAZJks GUBUNGoomnAwxj1YyNUZ/Uk1pPxvsASIRuq0gb9tlDxs8vydnPovleEGH0Bs4s3lAin8 6srUI9vXFJAbqsN1jQZMCdMaIYe15gNE+WrAulb+5Jk9daUzlKddL202FCT6fSgdDJgd ix0uxlL6rFTRitXc/YdFfoI/v5sFQr81mn9UKRpzg18NifqZh0wN6tiBKLlFw87HdBv5 hymw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=UaPOtdBDZe4x/dJbeCjrVF6QNzv0ZLfNcWq1YThRP0s=; b=ZTklqHGeeLiXyEK1uwDOeLqeBlmoHqJ+IXRe0PF3w16LyNkXXw8wOZpXbf0h3TQONo fqX29TcVHV5hu4FQWWvgvfq5eebvBp91uOjC5gs9UxU9G1sbcVeeBDbXtxpXw9VpmL7e OeoF39REnezQ7wuJsOt6FQyumSQmABZNt19zL7yeeJ64MfAD/cbDXhCrG0M2bNoKRgWJ OO4ZeHUACW1t0j7nJ5KyBreLMkdVdDfqxoRHp1lIIEM9cpB4LurhM9YbOvHj9f97QDWI uYY49xsPsg9qkllzc3nXfBPxfycJvVdqvXQ7WZhhQL1FeY4ErL9nJ3TSomWPUUSKgiDx BYwg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=BLx3Ps5a; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id o6-20020a170906774600b006f3a0bc0cf1sor3977654ejn.128.2022.07.24.23.54.28 for (Google Transport Security); Sun, 24 Jul 2022 23:54:28 -0700 (PDT) Received-SPF: pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; X-Received: by 2002:a17:907:a063:b0:72b:52f7:feea with SMTP id ia3-20020a170907a06300b0072b52f7feeamr9037282ejc.740.1658732068258; Sun, 24 Jul 2022 23:54:28 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.homenet.telecomitalia.it (host-87-14-98-67.retail.telecomitalia.it. [87.14.98.67]) by smtp.gmail.com with ESMTPSA id r2-20020a1709060d4200b00722e57fa051sm4967711ejh.90.2022.07.24.23.54.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Jul 2022 23:54:27 -0700 (PDT) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: michael@amarulasolutions.com, Amarula patchwork , Jeroen Hofstee , Oliver Hartkopp , Dario Binacchi , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Marc Kleine-Budde , Paolo Abeni , Wolfgang Grandegger , linux-can@vger.kernel.org, netdev@vger.kernel.org Subject: [PATCH v2 3/6] can: slcan: change every `slc' occurrence in `slcan' Date: Mon, 25 Jul 2022 08:54:16 +0200 Message-Id: <20220725065419.3005015-4-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220725065419.3005015-1-dario.binacchi@amarulasolutions.com> References: <20220725065419.3005015-1-dario.binacchi@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: dario.binacchi@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=BLx3Ps5a; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , In the driver there are parts of code where the prefix `slc' is used and others where the prefix `slcan' is used instead. The patch replaces every occurrence of `slc' with `slcan', except for the netdev functions where, to avoid compilation conflicts, it was necessary to replace `slc' with `slcan_netdev'. The patch does not make any functional changes. Signed-off-by: Dario Binacchi --- (no changes since v1) drivers/net/can/slcan/slcan-core.c | 109 +++++++++++++++-------------- 1 file changed, 56 insertions(+), 53 deletions(-) diff --git a/drivers/net/can/slcan/slcan-core.c b/drivers/net/can/slcan/slcan-core.c index 2c546f4a7981..09d4abbbd9f4 100644 --- a/drivers/net/can/slcan/slcan-core.c +++ b/drivers/net/can/slcan/slcan-core.c @@ -63,16 +63,17 @@ MODULE_LICENSE("GPL"); MODULE_AUTHOR("Oliver Hartkopp "); /* maximum rx buffer len: extended CAN frame with timestamp */ -#define SLC_MTU (sizeof("T1111222281122334455667788EA5F\r") + 1) - -#define SLC_CMD_LEN 1 -#define SLC_SFF_ID_LEN 3 -#define SLC_EFF_ID_LEN 8 -#define SLC_STATE_LEN 1 -#define SLC_STATE_BE_RXCNT_LEN 3 -#define SLC_STATE_BE_TXCNT_LEN 3 -#define SLC_STATE_FRAME_LEN (1 + SLC_CMD_LEN + SLC_STATE_BE_RXCNT_LEN + \ - SLC_STATE_BE_TXCNT_LEN) +#define SLCAN_MTU (sizeof("T1111222281122334455667788EA5F\r") + 1) + +#define SLCAN_CMD_LEN 1 +#define SLCAN_SFF_ID_LEN 3 +#define SLCAN_EFF_ID_LEN 8 +#define SLCAN_STATE_LEN 1 +#define SLCAN_STATE_BE_RXCNT_LEN 3 +#define SLCAN_STATE_BE_TXCNT_LEN 3 +#define SLCAN_STATE_FRAME_LEN (1 + SLCAN_CMD_LEN + \ + SLCAN_STATE_BE_RXCNT_LEN + \ + SLCAN_STATE_BE_TXCNT_LEN) struct slcan { struct can_priv can; @@ -83,9 +84,9 @@ struct slcan { struct work_struct tx_work; /* Flushes transmit buffer */ /* These are pointers to the malloc()ed frame buffers. */ - unsigned char rbuff[SLC_MTU]; /* receiver buffer */ + unsigned char rbuff[SLCAN_MTU]; /* receiver buffer */ int rcount; /* received chars counter */ - unsigned char xbuff[SLC_MTU]; /* transmitter buffer */ + unsigned char xbuff[SLCAN_MTU]; /* transmitter buffer*/ unsigned char *xhead; /* pointer to next XMIT byte */ int xleft; /* bytes left in XMIT queue */ @@ -164,7 +165,7 @@ int slcan_enable_err_rst_on_open(struct net_device *ndev, bool on) *************************************************************************/ /* Send one completely decapsulated can_frame to the network layer */ -static void slc_bump_frame(struct slcan *sl) +static void slcan_bump_frame(struct slcan *sl) { struct sk_buff *skb; struct can_frame *cf; @@ -184,10 +185,10 @@ static void slc_bump_frame(struct slcan *sl) fallthrough; case 't': /* store dlc ASCII value and terminate SFF CAN ID string */ - cf->len = sl->rbuff[SLC_CMD_LEN + SLC_SFF_ID_LEN]; - sl->rbuff[SLC_CMD_LEN + SLC_SFF_ID_LEN] = 0; + cf->len = sl->rbuff[SLCAN_CMD_LEN + SLCAN_SFF_ID_LEN]; + sl->rbuff[SLCAN_CMD_LEN + SLCAN_SFF_ID_LEN] = 0; /* point to payload data behind the dlc */ - cmd += SLC_CMD_LEN + SLC_SFF_ID_LEN + 1; + cmd += SLCAN_CMD_LEN + SLCAN_SFF_ID_LEN + 1; break; case 'R': cf->can_id = CAN_RTR_FLAG; @@ -195,16 +196,16 @@ static void slc_bump_frame(struct slcan *sl) case 'T': cf->can_id |= CAN_EFF_FLAG; /* store dlc ASCII value and terminate EFF CAN ID string */ - cf->len = sl->rbuff[SLC_CMD_LEN + SLC_EFF_ID_LEN]; - sl->rbuff[SLC_CMD_LEN + SLC_EFF_ID_LEN] = 0; + cf->len = sl->rbuff[SLCAN_CMD_LEN + SLCAN_EFF_ID_LEN]; + sl->rbuff[SLCAN_CMD_LEN + SLCAN_EFF_ID_LEN] = 0; /* point to payload data behind the dlc */ - cmd += SLC_CMD_LEN + SLC_EFF_ID_LEN + 1; + cmd += SLCAN_CMD_LEN + SLCAN_EFF_ID_LEN + 1; break; default: goto decode_failed; } - if (kstrtou32(sl->rbuff + SLC_CMD_LEN, 16, &tmpid)) + if (kstrtou32(sl->rbuff + SLCAN_CMD_LEN, 16, &tmpid)) goto decode_failed; cf->can_id |= tmpid; @@ -251,7 +252,7 @@ static void slc_bump_frame(struct slcan *sl) * sb256256 : state bus-off: rx counter 256, tx counter 256 * sa057033 : state active, rx counter 57, tx counter 33 */ -static void slc_bump_state(struct slcan *sl) +static void slcan_bump_state(struct slcan *sl) { struct net_device *dev = sl->dev; struct sk_buff *skb; @@ -277,16 +278,16 @@ static void slc_bump_state(struct slcan *sl) return; } - if (state == sl->can.state || sl->rcount < SLC_STATE_FRAME_LEN) + if (state == sl->can.state || sl->rcount < SLCAN_STATE_FRAME_LEN) return; - cmd += SLC_STATE_BE_RXCNT_LEN + SLC_CMD_LEN + 1; - cmd[SLC_STATE_BE_TXCNT_LEN] = 0; + cmd += SLCAN_STATE_BE_RXCNT_LEN + SLCAN_CMD_LEN + 1; + cmd[SLCAN_STATE_BE_TXCNT_LEN] = 0; if (kstrtou32(cmd, 10, &txerr)) return; *cmd = 0; - cmd -= SLC_STATE_BE_RXCNT_LEN; + cmd -= SLCAN_STATE_BE_RXCNT_LEN; if (kstrtou32(cmd, 10, &rxerr)) return; @@ -314,7 +315,7 @@ static void slc_bump_state(struct slcan *sl) * e1a : len 1, errors: ACK error * e3bcO: len 3, errors: Bit0 error, CRC error, Tx overrun error */ -static void slc_bump_err(struct slcan *sl) +static void slcan_bump_err(struct slcan *sl) { struct net_device *dev = sl->dev; struct sk_buff *skb; @@ -330,7 +331,7 @@ static void slc_bump_err(struct slcan *sl) else return; - if ((len + SLC_CMD_LEN + 1) > sl->rcount) + if ((len + SLCAN_CMD_LEN + 1) > sl->rcount) return; skb = alloc_can_err_skb(dev, &cf); @@ -338,7 +339,7 @@ static void slc_bump_err(struct slcan *sl) if (skb) cf->can_id |= CAN_ERR_PROT | CAN_ERR_BUSERROR; - cmd += SLC_CMD_LEN + 1; + cmd += SLCAN_CMD_LEN + 1; for (i = 0; i < len; i++, cmd++) { switch (*cmd) { case 'a': @@ -427,7 +428,7 @@ static void slc_bump_err(struct slcan *sl) netif_rx(skb); } -static void slc_bump(struct slcan *sl) +static void slcan_bump(struct slcan *sl) { switch (sl->rbuff[0]) { case 'r': @@ -437,11 +438,11 @@ static void slc_bump(struct slcan *sl) case 'R': fallthrough; case 'T': - return slc_bump_frame(sl); + return slcan_bump_frame(sl); case 'e': - return slc_bump_err(sl); + return slcan_bump_err(sl); case 's': - return slc_bump_state(sl); + return slcan_bump_state(sl); default: return; } @@ -453,12 +454,12 @@ static void slcan_unesc(struct slcan *sl, unsigned char s) if ((s == '\r') || (s == '\a')) { /* CR or BEL ends the pdu */ if (!test_and_clear_bit(SLF_ERROR, &sl->flags) && sl->rcount > 4) - slc_bump(sl); + slcan_bump(sl); sl->rcount = 0; } else { if (!test_bit(SLF_ERROR, &sl->flags)) { - if (sl->rcount < SLC_MTU) { + if (sl->rcount < SLCAN_MTU) { sl->rbuff[sl->rcount++] = s; return; } @@ -474,7 +475,7 @@ static void slcan_unesc(struct slcan *sl, unsigned char s) *************************************************************************/ /* Encapsulate one can_frame and stuff into a TTY queue. */ -static void slc_encaps(struct slcan *sl, struct can_frame *cf) +static void slcan_encaps(struct slcan *sl, struct can_frame *cf) { int actual, i; unsigned char *pos; @@ -491,11 +492,11 @@ static void slc_encaps(struct slcan *sl, struct can_frame *cf) /* determine number of chars for the CAN-identifier */ if (cf->can_id & CAN_EFF_FLAG) { id &= CAN_EFF_MASK; - endpos = pos + SLC_EFF_ID_LEN; + endpos = pos + SLCAN_EFF_ID_LEN; } else { *pos |= 0x20; /* convert R/T to lower case for SFF */ id &= CAN_SFF_MASK; - endpos = pos + SLC_SFF_ID_LEN; + endpos = pos + SLCAN_SFF_ID_LEN; } /* build 3 (SFF) or 8 (EFF) digit CAN identifier */ @@ -505,7 +506,8 @@ static void slc_encaps(struct slcan *sl, struct can_frame *cf) id >>= 4; } - pos += (cf->can_id & CAN_EFF_FLAG) ? SLC_EFF_ID_LEN : SLC_SFF_ID_LEN; + pos += (cf->can_id & CAN_EFF_FLAG) ? + SLCAN_EFF_ID_LEN : SLCAN_SFF_ID_LEN; *pos++ = cf->len + '0'; @@ -583,7 +585,8 @@ static void slcan_write_wakeup(struct tty_struct *tty) } /* Send a can_frame to a TTY queue. */ -static netdev_tx_t slc_xmit(struct sk_buff *skb, struct net_device *dev) +static netdev_tx_t slcan_netdev_xmit(struct sk_buff *skb, + struct net_device *dev) { struct slcan *sl = netdev_priv(dev); @@ -602,7 +605,7 @@ static netdev_tx_t slc_xmit(struct sk_buff *skb, struct net_device *dev) } netif_stop_queue(sl->dev); - slc_encaps(sl, (struct can_frame *)skb->data); /* encaps & send */ + slcan_encaps(sl, (struct can_frame *)skb->data); /* encaps & send */ spin_unlock(&sl->lock); out: @@ -645,7 +648,7 @@ static int slcan_transmit_cmd(struct slcan *sl, const unsigned char *cmd) } /* Netdevice UP -> DOWN routine */ -static int slc_close(struct net_device *dev) +static int slcan_netdev_close(struct net_device *dev) { struct slcan *sl = netdev_priv(dev); int err; @@ -674,10 +677,10 @@ static int slc_close(struct net_device *dev) } /* Netdevice DOWN -> UP routine */ -static int slc_open(struct net_device *dev) +static int slcan_netdev_open(struct net_device *dev) { struct slcan *sl = netdev_priv(dev); - unsigned char cmd[SLC_MTU]; + unsigned char cmd[SLCAN_MTU]; int err, s; /* The baud rate is not set with the command @@ -737,16 +740,16 @@ static int slc_open(struct net_device *dev) return err; } -static int slcan_change_mtu(struct net_device *dev, int new_mtu) +static int slcan_netdev_change_mtu(struct net_device *dev, int new_mtu) { return -EINVAL; } -static const struct net_device_ops slc_netdev_ops = { - .ndo_open = slc_open, - .ndo_stop = slc_close, - .ndo_start_xmit = slc_xmit, - .ndo_change_mtu = slcan_change_mtu, +static const struct net_device_ops slcan_netdev_ops = { + .ndo_open = slcan_netdev_open, + .ndo_stop = slcan_netdev_close, + .ndo_start_xmit = slcan_netdev_xmit, + .ndo_change_mtu = slcan_netdev_change_mtu, }; /****************************************** @@ -819,7 +822,7 @@ static int slcan_open(struct tty_struct *tty) /* Configure netdev interface */ sl->dev = dev; - dev->netdev_ops = &slc_netdev_ops; + dev->netdev_ops = &slcan_netdev_ops; slcan_set_ethtool_ops(dev); /* Mark ldisc channel as alive */ @@ -887,7 +890,7 @@ static int slcan_ioctl(struct tty_struct *tty, unsigned int cmd, } } -static struct tty_ldisc_ops slc_ldisc = { +static struct tty_ldisc_ops slcan_ldisc = { .owner = THIS_MODULE, .num = N_SLCAN, .name = "slcan", @@ -905,7 +908,7 @@ static int __init slcan_init(void) pr_info("slcan: serial line CAN interface driver\n"); /* Fill in our line protocol discipline, and register it */ - status = tty_register_ldisc(&slc_ldisc); + status = tty_register_ldisc(&slcan_ldisc); if (status) pr_err("slcan: can't register line discipline\n"); @@ -917,7 +920,7 @@ static void __exit slcan_exit(void) /* This will only be called when all channels have been closed by * userspace - tty_ldisc.c takes care of the module's refcount. */ - tty_unregister_ldisc(&slc_ldisc); + tty_unregister_ldisc(&slcan_ldisc); } module_init(slcan_init); From patchwork Mon Jul 25 06:54:17 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 2248 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-ej1-f70.google.com (mail-ej1-f70.google.com [209.85.218.70]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 2D6723F046 for ; Mon, 25 Jul 2022 08:54:31 +0200 (CEST) Received: by mail-ej1-f70.google.com with SMTP id hq20-20020a1709073f1400b0072b9824f0a2sf2830915ejc.23 for ; Sun, 24 Jul 2022 23:54:31 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1658732071; cv=pass; d=google.com; s=arc-20160816; b=G08CnA3r24NZg2VXHogE5vxECKuXenVZiz6+VtSrQLX1fhrJK3bp6ggnSiG+UYFsoB cJWrFQvBJu9BvQbLRyIqSRkYWJFB4NMKzCJz/3HN6sMYovgvthAocpGjN8q61p2RmlJZ HlIR+beHtDxFsTDUelX62NEas9hsTlz+T5rvPyApkNgQcD/Eza/2Y6k78SYPAEmNw20y WLWhQ6F9DKjafpchz+fnJCPnV5RpznY42wiBSCzvxx7Nly4Nh4Z1nBtOlh5iA6sVs15b 5ENs4UOFw9yVKiIIaKQL78V3cBjQJ0KwAKHbZOVx9zP39t9E83FXANA+hvYo4v1USXlx RyMg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=b29gdo9J3N706r4dXtbubdUhtS6fbjqR/zgHmgX55qY=; b=nIRDzAU3/PfQ1hkiI4FJIbPIIGLV1RYxbXfDkSsoC1SoaS6vnDm1kX2DtfCz0lp7OM AeuT9/dCmGnMuw6ajTGq6FXnCMUsT5PzMBP9IrZIRgWNWZXCZC3IH76pgt01NKAB319X IgDgiomj0/eM9b+mx6VtXHV7jrNk/nX/bOaSuyLosgnhUHMjo1cPCIPQpODkorY/n3/N ivafYEsfZ5i3A50HSFQPhkKDdABWvXpt3CGfAzE2A6k3Rg55Qkugv/Mnwk5WRcD7B1fq 75J51ZKhzDbxi+ODJmZMk86bAERiGeADLvw6CQrrWnqzucsXTyszB9I0LcFQmCuwmvpH EzDw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=eMTP8obK; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=b29gdo9J3N706r4dXtbubdUhtS6fbjqR/zgHmgX55qY=; b=oU0YWz9GlTlxdaxOsNhDGTCUS2fZKdPG98TlG0RbfrTlyrmWnfNjNlWbomcn74YAa3 n2+6iqQGezzHeWyZVeu6Db6HwcA93d72XuwYAAqvL4rO5bUSvB+RJ3Gl85pmRUb6ewwD 3A6nwD+UcAkcuPUX0S/P+ngXH7ULf8Tq8vfeI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=b29gdo9J3N706r4dXtbubdUhtS6fbjqR/zgHmgX55qY=; b=0hRJpIpcNXRsWr45q8rTFSPpxGon+f6lc7mK299Un3Vx/GOKmFl5xa7yIH+NIZyhCp MWoSpkIZihiYnUwj4F4g57Bcb2UMhx1BLVzvsvaI43cdFfnPTnTrNxrjanJ/TnNns08J /RDx0FBsPym4TDGmXU5ggcQG4wim3P6/DwqRZylIzZncAIQIhQPZR3jT+UYOHfAN4kgw PvVsTzkdSRQdrulLIfRrOI5B14N/94k5wRIEbp7qB7EUu9eQ3r4WkLtIAWSWlMcDNt9a AIrp1vVPJUMY47WAYMBF3Tq80r1klWrzU50StYLFQKOvhTXcu83RDygR2Yxt2Peh7u3n 08fA== X-Gm-Message-State: AJIora8z2G9ITDuH2XRGngTXZ0s0Jlh0YwKMoXBPeIYZxwozpdCoroEW 0Mugxn62+vlYKV37BJv/Rp9yIgB3 X-Google-Smtp-Source: AGRyM1t3+l/grqd/9OXBGI6dGx4VNcp6q/ja7II1ypHrvB7DsjCdnQnXwvg+KYCpgWOEnLQKO9KyIQ== X-Received: by 2002:a17:907:761b:b0:72b:379e:39ea with SMTP id jx27-20020a170907761b00b0072b379e39eamr8990460ejc.591.1658732070867; Sun, 24 Jul 2022 23:54:30 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:906:3b47:b0:6fe:b664:4b5f with SMTP id h7-20020a1709063b4700b006feb6644b5fls1664482ejf.2.-pod-prod-gmail; Sun, 24 Jul 2022 23:54:30 -0700 (PDT) X-Received: by 2002:a17:907:b590:b0:72f:90ba:bef0 with SMTP id qx16-20020a170907b59000b0072f90babef0mr8855383ejc.333.1658732069824; Sun, 24 Jul 2022 23:54:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658732069; cv=none; d=google.com; s=arc-20160816; b=ttaWFyxGRkQGIqUgd0l1TKzSAAVlAhpumwYih2rzQ+J8L/dpOJSfCPawZaNqq41eVU oN7M4Z/E1Q348bXXRCY/Dh9KOlc/ng55M+lyCuJhz/ijlJFdkMlWoSze7eLWHB+7isxt 2DfMsrbOj1vRJDrVwD7wI0zTCumAl9wfpjQS7iw2g5RfsiQrAFJyO9rIxYGbYr7QRN3c Pzx6VMSMlUxKOXbsWibEv+ZzV3tcOrl3QVJeGJ12zUBbCXrjIaYtlsGWe7RjZzebq4pN 0okWUSz6hR4m2Hu5MIEqc9ePwSLE9GiFRGOlEf/wnHNj7ZJPOOYYlruI4H+5Psz9UKz/ 1HFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=WtIlfV0TRfMwcTJkeyhrUYfoxrMyuEr0LUCaeLfKOGs=; b=NbXscvBCftZjd560m+FRUAkxTZ6Nec4efUL3vUQ6FPSTaUNc/i2w4FuO24pO09/v02 fylDMXxPYckrJJVDb2mUmaeDdUIUEoPvkw0ZRjIsWJ6WAYb+BqtLW/hATNYNSs9xtrQY G6decBK0ta/Hq82MwDPmpOLHCsB0l2mNPluaZujNbWkyyLVWbsyQ253mURU3CSFVY7Hg tWfJx3RpYiCYHxMImXg75aHsT1pJy0usqFiqETc6FXdVnRzu28iGjqu7L4l6M29QOrYN pqMsGMywIflHKgH9LmH18uKOBGcUUDWVT/j+hy0RDqVRPkq5ayJoj/5DUIBOQ8CiEKmp Elyg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=eMTP8obK; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id u14-20020a17090617ce00b0072b17278302sor3847359eje.78.2022.07.24.23.54.29 for (Google Transport Security); Sun, 24 Jul 2022 23:54:29 -0700 (PDT) Received-SPF: pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; X-Received: by 2002:a17:907:7638:b0:72d:f11b:5ebb with SMTP id jy24-20020a170907763800b0072df11b5ebbmr8846038ejc.647.1658732069630; Sun, 24 Jul 2022 23:54:29 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.homenet.telecomitalia.it (host-87-14-98-67.retail.telecomitalia.it. [87.14.98.67]) by smtp.gmail.com with ESMTPSA id r2-20020a1709060d4200b00722e57fa051sm4967711ejh.90.2022.07.24.23.54.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Jul 2022 23:54:29 -0700 (PDT) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: michael@amarulasolutions.com, Amarula patchwork , Jeroen Hofstee , Oliver Hartkopp , Dario Binacchi , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Marc Kleine-Budde , Paolo Abeni , Wolfgang Grandegger , linux-can@vger.kernel.org, netdev@vger.kernel.org Subject: [PATCH v2 4/6] can: slcan: use the generic can_change_mtu() Date: Mon, 25 Jul 2022 08:54:17 +0200 Message-Id: <20220725065419.3005015-5-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220725065419.3005015-1-dario.binacchi@amarulasolutions.com> References: <20220725065419.3005015-1-dario.binacchi@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: dario.binacchi@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=eMTP8obK; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , It is useless to define a custom function that does nothing but always return the same error code. Better to use the generic can_change_mtu() function. Signed-off-by: Dario Binacchi --- (no changes since v1) drivers/net/can/slcan/slcan-core.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/net/can/slcan/slcan-core.c b/drivers/net/can/slcan/slcan-core.c index 09d4abbbd9f4..919311890d2c 100644 --- a/drivers/net/can/slcan/slcan-core.c +++ b/drivers/net/can/slcan/slcan-core.c @@ -740,16 +740,11 @@ static int slcan_netdev_open(struct net_device *dev) return err; } -static int slcan_netdev_change_mtu(struct net_device *dev, int new_mtu) -{ - return -EINVAL; -} - static const struct net_device_ops slcan_netdev_ops = { .ndo_open = slcan_netdev_open, .ndo_stop = slcan_netdev_close, .ndo_start_xmit = slcan_netdev_xmit, - .ndo_change_mtu = slcan_netdev_change_mtu, + .ndo_change_mtu = can_change_mtu, }; /****************************************** From patchwork Mon Jul 25 06:54:18 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 2249 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-ej1-f69.google.com (mail-ej1-f69.google.com [209.85.218.69]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 61EDE3F046 for ; Mon, 25 Jul 2022 08:54:32 +0200 (CEST) Received: by mail-ej1-f69.google.com with SMTP id sc42-20020a1709078a2a00b0072b5f51a9dbsf2752286ejc.1 for ; Sun, 24 Jul 2022 23:54:32 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1658732072; cv=pass; d=google.com; s=arc-20160816; b=C9p2NK3RW0JlBXbJHwLwb6XsisGjwN1jDQA4OgZPkogyOm6/tEAnVIQmLEP/+fsSpx qTYKDxaoWH/oECmsKFC9xI3/4Rp6/8wT9Nf1YZ3Ob9gsM2QYI4+cD5QnrlghVY9JCVa3 wOYLUcsYfbnZQfxQSs8Yf4ccmQWvVUFIhF5jeMuk7YUjhOjTDcVAzU5dCryZscOZhtP5 mf6vISMDwJV5NylGkMNxPfnYrlB/FzZCK4KsI/ecc/vq7Gw/MEKIPnbmIe+9Pc3vRNip dwXWBqsPW9EJQ6os0QFRR1GYyg7kYg0QHWxbUACvJCFBAIstk9dHP0pa1ZsjzUsivpU4 +TVQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=sNzkDDR0xz432Drd0DAskCIS5G3/hC4iupN4x/XdKKE=; b=EmaaN/SbfhG31xkFqbUJcsorMnS51g4+hxK6veSD5kh9nTK269r6TwutLIoRhMhcbJ +uZcewMll9aEJtZ5xNwPldd3IUaQbp7sPL5NLSH68gkOAlYfBXsBOXOhxu0qchUp00Ld UyDhL4DF5xnQanvwPV97D6GAHVBO7IHaM28rGBYhE8OYis7qgCkur291tGa8Q9b4WV3m Cm7iWJTxNQWSBRKsV7IYp1LDT/aIb2H733JlrCU8yzGZ7WFIMZm72DyYoeRLvv4bRKSA 7rUEQJwxgYslVp/Utw2Wd/uRIsoDN6cTzRnthbo9LMFU6hO8TKTgyhbf7z3AIXfKKILH Aszw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=J1YmFNSG; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=sNzkDDR0xz432Drd0DAskCIS5G3/hC4iupN4x/XdKKE=; b=CwxIeh7ap/8Ucm34IvWqxq3f7aPuToIivqX5NvXpuYFi+MXEWQrlqZMiWeCJ8Xx0yn FvU3ZS6whQ99wPnGz/v36bAHEKdg/uWp2BNcnBNsYOD91++nxTrk3xXrZCSBAKzMmbp2 AMINaJWy01QsUyYYnkyxYQl7mO/kDsQSpPmyA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=sNzkDDR0xz432Drd0DAskCIS5G3/hC4iupN4x/XdKKE=; b=VBIcBpMOYdHQXM7JadFNoNOauX4bHs2IBHjhmLur6+k0f0l9Av4hqkVqjJPovDraTj 1jJrYlD8/YF0cf85GRBWslUh5ASPDA5bREo85fw9xLoU6krMbJXJVTm1ptFdA36NDLYk KA0ifmGepXcgx3lwEtt0Zv6iyh12J/NsXO5WBItzgf2lHtrOf3JyUs9y10remBSXUVcK W9ejI4xB7f+x9vMW+QvN5TzjXvM8MWUG3l2zzqmMlqXdRPEjgJpxsuYvkl5BDLM7g2Ny u/lE6mej5avajMsvvYph7yxIklxF5Sfbk2m9NM3YTY6wInGAGN3aWWERojrloMAieojY nMkg== X-Gm-Message-State: AJIora9LdJSBuL/29711l08DQlK+O7gL7nTw6sbDWmXrg6CFK3gNb5xQ nBKqqzzts8DHVLyS74Wxlpdv6mRO X-Google-Smtp-Source: AGRyM1udrg4UqnoACEiL16x+hOra9oF6lUMezUDWxjvyEV5S4T0dzdV0tu0brJHD9zr7jxo6cIeTKA== X-Received: by 2002:a05:6402:3907:b0:431:6776:64e7 with SMTP id fe7-20020a056402390700b00431677664e7mr11429111edb.0.1658732072204; Sun, 24 Jul 2022 23:54:32 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:906:814b:b0:72f:6ce5:d858 with SMTP id z11-20020a170906814b00b0072f6ce5d858ls1661401ejw.4.-pod-prod-gmail; Sun, 24 Jul 2022 23:54:31 -0700 (PDT) X-Received: by 2002:a17:907:d28:b0:72b:5cc9:99c with SMTP id gn40-20020a1709070d2800b0072b5cc9099cmr8930667ejc.228.1658732071144; Sun, 24 Jul 2022 23:54:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658732071; cv=none; d=google.com; s=arc-20160816; b=hVb8YEFxB6x6XlgvDW3bsPjFCKzX5uYMe3BFr+zhwmyviQrqXFubGOzO3txyp49xGr rI0NvTzkbssXEKGqrbBF3GgvzZMqjouAHaz/ossmeP2w1oUu4zsQfwiSbHm82DjGx9WN Q47Zjm/j26ZbhIN/8y3wscx0LBZhMYHvvDqSrn4GAIQRkWpIicIYciIrh1owm2aGXvv9 z8DJBV8lm7NaTIrp1QlukTl+vwsQujMT3pBrtCzh2rtXQBU2FOjZ4LPAdvCCKdd9IIr1 IdUEkvwhziDuTJ3mGi7Y2adDALJU4/tNlE/byC4ZSqUKZ6gUwnmg7bu+DELmrRetIFK1 58FA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=pq/5uoR3fJ3+2D6CJyRqXD1+RmzBjoigPwoKjoPD5TI=; b=rQwkxrxjHYcNqD21xSIp0Y/8LAG9D1RPUSPExLoAF160GSrC68WNZfBzsrq6cHO9Y8 7x8RPfZ75WLBcONj7r99QPWjclq9DAcbqlVVXS6IOGJVIfeFoCN+sN+pFi50G9b3qZMt 8fAPZmbGy2mW2DSyD585bqhnR998WmubjFr6pVq9k4WmF4DQ4vI409aBNj8mgEUFAzgB F1h62FZZhNOlydr5vaqyCUVQGuUIb6/hxYtLGauW/uC51EhZ+V4MRoiEFBoAXPIDLKFR LZtH1oCK/qg4oYBA3cUADBz7kVCu/ar/KnK0ISBnBmuMMXz8xHxED1Hyptg6zurdYrXx kgFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=J1YmFNSG; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id f17-20020a170906825100b006e05b7ccb57sor3976926ejx.10.2022.07.24.23.54.31 for (Google Transport Security); Sun, 24 Jul 2022 23:54:31 -0700 (PDT) Received-SPF: pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; X-Received: by 2002:a17:907:3ea6:b0:72b:4a06:989a with SMTP id hs38-20020a1709073ea600b0072b4a06989amr8756566ejc.168.1658732070983; Sun, 24 Jul 2022 23:54:30 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.homenet.telecomitalia.it (host-87-14-98-67.retail.telecomitalia.it. [87.14.98.67]) by smtp.gmail.com with ESMTPSA id r2-20020a1709060d4200b00722e57fa051sm4967711ejh.90.2022.07.24.23.54.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Jul 2022 23:54:30 -0700 (PDT) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: michael@amarulasolutions.com, Amarula patchwork , Jeroen Hofstee , Oliver Hartkopp , Dario Binacchi , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Marc Kleine-Budde , Paolo Abeni , Wolfgang Grandegger , linux-can@vger.kernel.org, netdev@vger.kernel.org Subject: [PATCH v2 5/6] can: slcan: add support for listen-only mode Date: Mon, 25 Jul 2022 08:54:18 +0200 Message-Id: <20220725065419.3005015-6-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220725065419.3005015-1-dario.binacchi@amarulasolutions.com> References: <20220725065419.3005015-1-dario.binacchi@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: dario.binacchi@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=J1YmFNSG; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , For non-legacy, i.e. ip based configuration, add support for listen-only mode. If listen-only is requested send a listen-only ("L\r") command instead of an open ("O\r") command to the adapter. Signed-off-by: Dario Binacchi --- Changes in v2: - Remove comment on listen-only command. - Update the commit subject and description. drivers/net/can/slcan/slcan-core.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/drivers/net/can/slcan/slcan-core.c b/drivers/net/can/slcan/slcan-core.c index 919311890d2c..76f20dc1aa90 100644 --- a/drivers/net/can/slcan/slcan-core.c +++ b/drivers/net/can/slcan/slcan-core.c @@ -724,10 +724,20 @@ static int slcan_netdev_open(struct net_device *dev) } } - err = slcan_transmit_cmd(sl, "O\r"); - if (err) { - netdev_err(dev, "failed to send open command 'O\\r'\n"); - goto cmd_transmit_failed; + if (sl->can.ctrlmode & CAN_CTRLMODE_LISTENONLY) { + err = slcan_transmit_cmd(sl, "L\r"); + if (err) { + netdev_err(dev, + "failed to send listen-only command 'L\\r'\n"); + goto cmd_transmit_failed; + } + } else { + err = slcan_transmit_cmd(sl, "O\r"); + if (err) { + netdev_err(dev, + "failed to send open command 'O\\r'\n"); + goto cmd_transmit_failed; + } } } @@ -814,6 +824,7 @@ static int slcan_open(struct tty_struct *tty) /* Configure CAN metadata */ sl->can.bitrate_const = slcan_bitrate_const; sl->can.bitrate_const_cnt = ARRAY_SIZE(slcan_bitrate_const); + sl->can.ctrlmode_supported = CAN_CTRLMODE_LISTENONLY; /* Configure netdev interface */ sl->dev = dev; From patchwork Mon Jul 25 06:54:19 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 2250 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-ej1-f69.google.com (mail-ej1-f69.google.com [209.85.218.69]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id BDDBB3F046 for ; Mon, 25 Jul 2022 08:54:33 +0200 (CEST) Received: by mail-ej1-f69.google.com with SMTP id hv22-20020a17090760d600b0072f2cce7d10sf2767862ejc.19 for ; Sun, 24 Jul 2022 23:54:33 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1658732073; cv=pass; d=google.com; s=arc-20160816; b=j3TLs5gtyI0yLiCpRRg0H44dnrH/q7dwDapLG1p2yuZN12cTJvwjIGGBrYaEuu3f3L jXCToi4FXeweVYYjWuyRzGRoT3SS+QDbW42HIaw56oSldPUjr04psxlgn1FvKPifoLsU 5psCfp0IWMEjHsgKXMHqGJU/Dwb3jVnonns2LfSPmPsmx+1H0KuXXF3amMmcbc6cNbf2 zt6CHqA1ubjGbM28Q8oI3Z2RhF/pAfFpbOXsp5IzVnUTwD1tMdmZYCK1cmDlrg+vCc8a dzsRhwcVFIHxSTWerCpTtP1bJ3BoK+0XY3jvlUNaJ2/7O5Y5AC9TtGSQrgoC+K4YU6pr 3B8Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=YGr6MJhwroVjFzvxZcUeh1nbyhqAypehQLEusIhNwGc=; b=n/MwEhD8wAkPDCbRF5Gp2pdekumt1myzEX3ofgj/shdctY08u3vUif6k3nUDG4OZHc H4fqvgJkPAB7tmBaONcBqm4MwAyvyL265jhvlTPqwRPnYQWlTg9Y+JPLzmzPq4Z/1F72 hXd5gxYIQa02vpZJsE+FSpAoy9taPzAfLl6MmD/X7avL96ELDu5W5Gz3rZamqsbiDv48 WzW1vWVUWDU5ue/mZq9Cfj84i++RILnWWjiVgHm/Pb2JUWgmyImplhv0QGYB5H04yg9+ MfGSEcyvLbbu3ikuCIIp5RBsa8Ad80aQcoM9bMiex6SeB9X9Oc/TxwjWEw4CYFflNs/9 46QA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=DyfTiEUM; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=YGr6MJhwroVjFzvxZcUeh1nbyhqAypehQLEusIhNwGc=; b=SFyIE4tDSMhJiPShh+WcbbPWq94tFFfL42W6nZmq59PeSrxYxsjqNIZN8xA3AME2/t kz5AwMeyh7C7QqyCIqAETKayR2gJhzdIYIkuEdf9M7LmIGBrMK6Y6Vnqp3qN9xFMk4rG BqJ6D4O3xijXKKlTFtp5s2b1O8blmJl8LMlEc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=YGr6MJhwroVjFzvxZcUeh1nbyhqAypehQLEusIhNwGc=; b=a7vl35SdWpEP53tBqs/jK5bDeFsWNJvVyCzh0VKkR7lnMqaVDM6t1U+PJbH1MJ+1F7 T7UDwe8Avikv0BrPy8SR+xRhSku080YqY9DN8DOJlJfVP1XoXYAGcOYqd9IMKotb1RrD soG29V/SnnHGFtCnSRGZ0NoFzHvC26xlq+ILDBj/EheqsFGzaq2bQZVhVd92TethuFV/ qPMUvm3sFGIK1qq6UFk+X8f1kSBhwsZpNGBbSJdF2ERqP+82rz85Bq7XT9ZLFMTF6Lff 9PbC/PCEPUyi4mAlAQ/zoVdHfUccXChO88DeBao++/P6oLo+EujdmRPyVe7VlQEAnBxb D7KQ== X-Gm-Message-State: AJIora8cqN0RfS/mnY7QYAmkoSTn7HNWQjwZ4gjsEMZCVklvb/vyHMw0 67hw7+vZ9DTnf9Ykfdyorki4Nlc9 X-Google-Smtp-Source: AGRyM1s/AUBxoD+95zmJYVIMEhz+d9YXjY5XS8E2T2Ej6aU0NJE0N8D0TnL46XaIiA7jOPkqix5J4Q== X-Received: by 2002:a17:907:a42c:b0:72f:88b:2fe9 with SMTP id sg44-20020a170907a42c00b0072f088b2fe9mr8705480ejc.495.1658732073628; Sun, 24 Jul 2022 23:54:33 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a50:d0d7:0:b0:43a:6e16:5059 with SMTP id g23-20020a50d0d7000000b0043a6e165059ls3518780edf.2.-pod-prod-gmail; Sun, 24 Jul 2022 23:54:32 -0700 (PDT) X-Received: by 2002:a05:6402:28c3:b0:43a:6d78:1b64 with SMTP id ef3-20020a05640228c300b0043a6d781b64mr11615344edb.93.1658732072608; Sun, 24 Jul 2022 23:54:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658732072; cv=none; d=google.com; s=arc-20160816; b=e2xzrXACb19mj3dnds+h57YUvuyXY/R2bcKiqEhRi5Gg3TQHvSnS3uvolepArLfhxa VLgxoMO04xoEx8cuofIZU2SYdBMg5di3SOhsWCrvtaP+pJOnVlBmof5MJADYM1HT5ule /9LdCowpCR2JXedKsp8UKTl3/aDu48vqEusQZeFzfVWo40tg1m7xcLOkof88DjJ5CNCZ Jc3eqQLon44b66Ut6+xHEWio3J1Ayl+lpk59w0A7cAuenbVtEvLV1tLhcw+hUxdfHBD9 Wo4Z38I4EYyTsWOZyRjlY1T7NH6vt6YJMYFmFGo85n6iHGjFfkMgztzFxas6jkTOlFfU EQuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=42msKn5+43W2nDXBTScN29lMEs7hqwpf7Xhq17IH5cY=; b=sY14Zrk3WnYGcX5wZyyOVHIwu4khCgi/7x9Dt4NglZO98mT4lFf+unvcd7gqe//c6J jknZ3eKdMDm4RZbdsIy6AcYndsODLKpBCLsroi1IqSFUxkXkDenxf6iKznh4ldLnUH5z MBoK2nLV1p1Ic9NI8sLTv7C6goIQDk1FLL5Su52+exdutB2ZaU/eJYfay8VE1vngit/h hYC/cgvxYTksd9yh3QEzGMrCm6JnuiwTqJQdbfLfuLcMLaOoCZDQuUvA2r72lyPjjPPT 9kM7Y5mFoThmJaWN5YpxUlaxTiNnLsI7ror4GKBEo2xJFAUk4BxXn3o+ApujXM9xaNfl kefA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=DyfTiEUM; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id du1-20020a17090772c100b0072fac4531fdsor2475157ejc.98.2022.07.24.23.54.32 for (Google Transport Security); Sun, 24 Jul 2022 23:54:32 -0700 (PDT) Received-SPF: pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; X-Received: by 2002:a17:906:6a29:b0:72e:e716:d220 with SMTP id qw41-20020a1709066a2900b0072ee716d220mr8674769ejc.82.1658732072425; Sun, 24 Jul 2022 23:54:32 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.homenet.telecomitalia.it (host-87-14-98-67.retail.telecomitalia.it. [87.14.98.67]) by smtp.gmail.com with ESMTPSA id r2-20020a1709060d4200b00722e57fa051sm4967711ejh.90.2022.07.24.23.54.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Jul 2022 23:54:32 -0700 (PDT) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: michael@amarulasolutions.com, Amarula patchwork , Jeroen Hofstee , Oliver Hartkopp , Dario Binacchi , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Marc Kleine-Budde , Paolo Abeni , Wolfgang Grandegger , linux-can@vger.kernel.org, netdev@vger.kernel.org Subject: [PATCH v2 6/6] MAINTAINERS: Add maintainer for the slcan driver Date: Mon, 25 Jul 2022 08:54:19 +0200 Message-Id: <20220725065419.3005015-7-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220725065419.3005015-1-dario.binacchi@amarulasolutions.com> References: <20220725065419.3005015-1-dario.binacchi@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: dario.binacchi@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=DyfTiEUM; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , At the suggestion of its author Oliver Hartkopp ([1]), I take over the maintainer-ship and add myself to the authors of the driver. [1] https://marc.info/?l=linux-can&m=165806705927851&w=2 Signed-off-by: Dario Binacchi --- Changes in v2: - Add the patch "MAINTAINERS: Add myself as maintainer of the SLCAN driver" to the series. MAINTAINERS | 6 ++++++ drivers/net/can/slcan/slcan-core.c | 1 + 2 files changed, 7 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index fc7d75c5cdb9..74e42f78e7cb 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -18448,6 +18448,12 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/vbabka/slab.git F: include/linux/sl?b*.h F: mm/sl?b* +SLCAN CAN NETWORK DRIVER +M: Dario Binacchi +L: linux-can@vger.kernel.org +S: Maintained +F: drivers/net/can/slcan/ + SLEEPABLE READ-COPY UPDATE (SRCU) M: Lai Jiangshan M: "Paul E. McKenney" diff --git a/drivers/net/can/slcan/slcan-core.c b/drivers/net/can/slcan/slcan-core.c index 76f20dc1aa90..54f16ebd72bc 100644 --- a/drivers/net/can/slcan/slcan-core.c +++ b/drivers/net/can/slcan/slcan-core.c @@ -61,6 +61,7 @@ MODULE_ALIAS_LDISC(N_SLCAN); MODULE_DESCRIPTION("serial line CAN interface"); MODULE_LICENSE("GPL"); MODULE_AUTHOR("Oliver Hartkopp "); +MODULE_AUTHOR("Dario Binacchi "); /* maximum rx buffer len: extended CAN frame with timestamp */ #define SLCAN_MTU (sizeof("T1111222281122334455667788EA5F\r") + 1)