From patchwork Fri Nov 22 22:15:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 3649 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 68EBD3F9F7 for ; Fri, 22 Nov 2024 23:17:00 +0100 (CET) Received: by mail-ed1-f69.google.com with SMTP id 4fb4d7f45d1cf-5cfc022859esf1549235a12.2 for ; Fri, 22 Nov 2024 14:17:00 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1732313820; cv=pass; d=google.com; s=arc-20240605; b=U63V5czCd6tym0T05BmFfbxKZZcY5+nCyOt9n/X0//5J4yQRQsmIfuRfHnXSbzv9T9 3/AmPYO2RLqhpRIcaNAEFJvXdoUTqCXlI3+ptXVc9m+ReayqQ/pDXZb3mVvpRTG0fl1z kQy3NOBV9eAwE+c8dLhbU4vch3GpugdnZigqDJaOuHkZMXlduVhGuNSQqKKUFZwsNsel drUszIUzMPXY6DmAqD2blSKNrOk7ZpZVjkzcW51sZRNcoSYqi+XKpBVX4unUgQJoICYN uKkVqkwW1Vox/rOPQb54StQloP0MYwJeKUDjFAHhWYwmgWAccSFcDFqEwVrKTXlre3a3 glyw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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=EkgZ4RNL7E0DOWckC9AoKsHUvuh96JQmIoZUZhhQOok=; fh=UIjzZ8l9xNEN68iOafO43LGFsXQcZWFC9/xG+/M/EPE=; b=lTnuWJYGwxpGWDqQ+elEz72Xa2GdkKH4lXmv+Xmsq7fh0V4HeMvVGRdSZXmDEBwp/4 Zs/WqzccMY1ni7z670SM4uGlqoybeadov+Sc/EircIvtzS5sz28TodxoO4RDTwoSUIf/ G2k0Br9qS9toLPajHqlGRdtIQECyECy6LoLo7SqlG3z0Gvz/To9Z9CvKYzce2d0+cTyA C5AOIDFC7jCaUEOUwD/c/X9AcBsBnuSdQ98oN6LqSNNNKPwGcakO0lse6nFNfRx7dfyE /mIHvOtLugtYr2B4sKOwthW1MR45rNyzPBxoRxOvqwxo0fgywafQlsBiA3PM0pSMNrv/ koag==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=jBwkw1Wr; 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; dara=pass header.i=@amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1732313820; x=1732918620; darn=patchwork.amarulasolutions.com; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=EkgZ4RNL7E0DOWckC9AoKsHUvuh96JQmIoZUZhhQOok=; b=bZqasePUZ/J2rG0eleHiz/r3Mcgi86RUh+w6gTqo3mWlp413puqe5FK/U/opEZviVc CgA27Xk9Shi/9BgT+m1GMvri6RmLsUceXODlYpqg5ty7HqOTOzhojDoQUTO0ddvUgsZ/ gEFPV3B1IIhM5v38fZRkdNCCw3ekio1qjHHAk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732313820; x=1732918620; h=list-unsubscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :x-beenthere:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=EkgZ4RNL7E0DOWckC9AoKsHUvuh96JQmIoZUZhhQOok=; b=Yxrrod+j6/sP2q+STM10sX/b8zoIkr/ZOC8DPBEfHDK4ua36Gr1SkF3uVxZIuISfHL CS1pNrFsWG473JFqeJbvjKuEtEbsProyVGL4uFduI25cWEhuU3b2j18S59rIVD9y+x6r bT2572Ug0/7OB6q8RclOLBR5C2gLoeqQFIU1KD79wLqkiQ63Yn9r5ZZGaMo/P82YLZ7X t4yHDRERLstImjmVlWyXMtoQqj1gOX0LRTK0GjlHshBC2MQCtJiOahsVphqZEK9EUbOD MnNG07g911VVWUp6n+798xVwXMDMD8K1tCS24WvOUYNM5alAsls0RfsrFvois67DDdGp V+tg== X-Forwarded-Encrypted: i=2; AJvYcCVeikhiFYBeuTTPmDh1tLGqWSWDEa+Uc/NRlWyc9CKZ0TrvttxDkMuG7ZpecgMTkRksC4RgHdcZir6DyQic@patchwork.amarulasolutions.com X-Gm-Message-State: AOJu0Yz3v5qi5nT8RU3Z/hbeh9OyUYYqSVlQVhxz+mrbX2g09/Bj4rKJ tAyR+mQ1fboqgBB9qiLfm9ru4dluBr5J1a/hlLF2iwVrFe7RoQjwCU6qdwXhIt0Fag== X-Google-Smtp-Source: AGHT+IG9EGHWg3kUWDIXXBVAJYXSU+hQVBsM4MovhHPD2eQvqznpk847xyNXXCguoUyqp1mm0VEitQ== X-Received: by 2002:a05:6402:378c:b0:5cf:cf61:25ea with SMTP id 4fb4d7f45d1cf-5d020602d48mr4095195a12.13.1732313820113; Fri, 22 Nov 2024 14:17:00 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:6402:3185:b0:5cf:e4ec:943b with SMTP id 4fb4d7f45d1cf-5d007e1201bls1022192a12.1.-pod-prod-01-eu; Fri, 22 Nov 2024 14:16:58 -0800 (PST) X-Received: by 2002:a17:907:7757:b0:aa5:2bfb:2ec5 with SMTP id a640c23a62f3a-aa52bfb30e6mr83695666b.5.1732313818252; Fri, 22 Nov 2024 14:16:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1732313818; cv=none; d=google.com; s=arc-20240605; b=Cnm78xPFmjZ8ZkMkxhathbFpl6QPF3RC4nKxyPPwEoZn0TbPTlAdyr28r5U/hR+mdm XuShzveYUS6yBkq/3uxc3Htdzs3btbrcJR6eLFgiqq3YUe/vU6CJcK5BbSl+xX/qM3iP 9mRhliay2pTJzrUBI24SkDrZt3Oe4zS0DJmfITxwT48YEkzqg4QHtpZlNZQH63hnZWhi O7BqQone//0i8HUefMob1gzkAZYeAw+eegOUUf6dPSJbIxYnkxL1z0TejKuJFIg1c92E g6XvfsxisNf7oPaJVNCuc9LVZsb+WzMjXBGTHl4heiHXiGf/RTejdEqWrX7gYQQCnPp5 Zciw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=da17qF15VPZTU2YSYHqLzMcyFK3KqWPtGcD0XFwPoOY=; fh=eh5UO+EfgNW3HEsjFVBKd3JKQRz7f6lKeemiIjrTgqY=; b=PkNrsKYaafOEuSfKK/OcGDEsM7tVbVEtcLKvakErdkYb8y8tVbk/z72JaAlbWNZkoQ BAtcpz94/32zXS94wfyGC5sVMxudZbEyBVYPlmd9CioTHXlFJ3SSFHzS3HfuMeP9E5bK 37tkiaMbS4hyNG5TyIXAMk0Ui3+O7Vnzn3+zao/iKHXk1MDlwGqksYnXsZJgjCWsmuFR QIKTfK5yu3zFZ9n92ij0lSFs6tfzhpxJZDyIS53Ny2aVDA3ohn6yWjKVOMKrUZQV097Y FA/O7R9gtGnuFIQTluT6+7cA2CGeAyobb3sQUFvCZwwVMuHDI1FwO+9+d4x6SdxkMj3S 1xKQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=jBwkw1Wr; 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; dara=pass header.i=@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 a640c23a62f3a-aa50b345d87sor96187966b.8.2024.11.22.14.16.58 for (Google Transport Security); Fri, 22 Nov 2024 14:16:58 -0800 (PST) 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-Gm-Gg: ASbGnctQO4M6zydIZwgfqd87RCGNzm2zEhvcI7p1z+NVXi+S0CL7NqOHCnGpQrk+CGA G0mdBvcE9givEVVGQxqGFoQLVdMEiYag00l59+pvn5+4mK00I7APaiA8pwrITMN1Z1et7VtH0uu 4bq8n9U5yImK6h39iQGhwCj1dBYSpkiwiPRVxK/utjbSUjTz+/GhqhghU5YNXC3gObeW3D/zrDM PhBLq2fDqwnDftFyzYwlYqtBMMfXLS29uLbyq230FuVJ7cyvBNv+9OXsATPj5pnfjSdph5wqf3Q GoPf1y742ZkqzBkoIC46iFVPOUhLuRV4GyaHvHCGBLki8FuvT2UNI0JBb2CXzqrCNj3BDQShqQA 0d5MSx/fy+Agjk4mG X-Received: by 2002:a17:906:4c9:b0:aa5:cec:2785 with SMTP id a640c23a62f3a-aa50cec28b3mr343858766b.25.1732313817919; Fri, 22 Nov 2024 14:16:57 -0800 (PST) Received: from dario-ThinkPad-T14s-Gen-2i.homenet.telecomitalia.it (host-82-54-94-193.retail.telecomitalia.it. [82.54.94.193]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-aa50b52fcebsm148226466b.127.2024.11.22.14.16.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Nov 2024 14:16:57 -0800 (PST) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: linux-amarula@amarulasolutions.com, Dario Binacchi , Chen-Yu Tsai , Jernej Skrabec , Marc Kleine-Budde , Samuel Holland , Vincent Mailhol , linux-arm-kernel@lists.infradead.org, linux-can@vger.kernel.org, linux-sunxi@lists.linux.dev Subject: [PATCH v2 03/12] can: sun4i_can: continue to use likely() to check skb Date: Fri, 22 Nov 2024 23:15:44 +0100 Message-ID: <20241122221650.633981-4-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241122221650.633981-1-dario.binacchi@amarulasolutions.com> References: <20241122221650.633981-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=jBwkw1Wr; 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; dara=pass header.i=@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: , Throughout the sun4i_can_err() function, the likely() macro is used to check the skb buffer, except in one instance. This patch makes the code consistent by using the macro in that case as well. Signed-off-by: Dario Binacchi --- Changes in v2: - Added in v2 drivers/net/can/sun4i_can.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/can/sun4i_can.c b/drivers/net/can/sun4i_can.c index 17f94cca93fb..840b972498c1 100644 --- a/drivers/net/can/sun4i_can.c +++ b/drivers/net/can/sun4i_can.c @@ -570,7 +570,7 @@ static int sun4i_can_err(struct net_device *dev, u8 isrc, u8 status) else state = CAN_STATE_ERROR_ACTIVE; } - if (skb && state != CAN_STATE_BUS_OFF) { + if (likely(skb) && state != CAN_STATE_BUS_OFF) { cf->can_id |= CAN_ERR_CNT; cf->data[6] = txerr; cf->data[7] = rxerr;