Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp51727pxb; Tue, 2 Mar 2021 18:49:52 -0800 (PST) X-Google-Smtp-Source: ABdhPJzHLP2Dp36Q6aJAlnaSjUtYE1OWqBFF/piyv6YNWUJrws8wmr8+XG7asldi0LVbdxNL4wEV X-Received: by 2002:a05:6402:278b:: with SMTP id b11mr6933633ede.380.1614739791761; Tue, 02 Mar 2021 18:49:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614739791; cv=none; d=google.com; s=arc-20160816; b=hGeT7t7PtmBxmKKk6DvI8nvDxz2LNTjMxQCG3EF5k6y44CpzGPDyXqXzRfaKJcayuD NlGVuFZEAnBxaVL3j7ZGiAqRZUOCeyvRNupgiCY2e1LV4MckuJ58syQMf47tXLaCGWTl pSia0PKIFqf8k0OlYf3OKB5a8VJCqBssT/HrDeZ7h5K1aNiKWImuarG7Wd8VWUajpHDn fPh/DLZFfV1ye9SbqFwPU0BA5DV3U1V/akJ4HpBc6TF+tPRZ1CdU3flVVDc/+1voS6UL 534OFFy/g46uT8usV5IGHWJ+x2DCozJ2thyQ49Y2KrvMqggIa92X1M4msrpSE2VJO7ii Fusg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=F6C/9IGPkbz1ob02MD5BLK0y4QJMDxYitxxfYYtVlnI=; b=M5EOqWJYpb4hESwSqPsyfXhCdcEWjcJ7kvyRaO89cuJGmHrPm3XJroQYZet/CXq93g r9UPR0sf8wbdkJ/ZKyE74m1ODdAAVvQt/VCR+okiv/+ISFcO2rW2fbSeTCLjuc6g8vMU PJYH2p8E7S48v321wm1rAkG5R/MEUC6d283dO3DZA+1cM/+Wo17H1g3aSKITe4Qg+Fkc DtZ4q7hBKwSDnCIggq3Ka2dvnEfS/hiuOKpZLFKzwADJt7rGlhz8GW1jcFKlsFR3X3xB 5tOVqeieK70GfefbhkRIlgr6dsEknjVPDVndv3JBW/4020PeEKMcoQQdWrZj53WT1c3n 0j9g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id va6si811010ejb.735.2021.03.02.18.49.28; Tue, 02 Mar 2021 18:49:51 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234074AbhCALjG (ORCPT + 99 others); Mon, 1 Mar 2021 06:39:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59192 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233493AbhCALjF (ORCPT ); Mon, 1 Mar 2021 06:39:05 -0500 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DEF0BC061788 for ; Mon, 1 Mar 2021 03:38:24 -0800 (PST) Received: from gallifrey.ext.pengutronix.de ([2001:67c:670:201:5054:ff:fe8d:eefb] helo=bjornoya.blackshift.org) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lGgsM-00055p-J4; Mon, 01 Mar 2021 12:38:10 +0100 Received: from pengutronix.de (unknown [IPv6:2a03:f580:87bc:d400:6e66:a1a4:a449:44cd]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: mkl-all@blackshift.org) by smtp.blackshift.org (Postfix) with ESMTPSA id 3E9525EB197; Mon, 1 Mar 2021 11:38:06 +0000 (UTC) Date: Mon, 1 Mar 2021 12:38:05 +0100 From: Marc Kleine-Budde To: Dario Binacchi Cc: linux-kernel@vger.kernel.org, Federico Vaga , Alexander Stein , "David S. Miller" , Jakub Kicinski , Oliver Hartkopp , Vincent Mailhol , Wolfgang Grandegger , YueHaibing , Zhang Qilong , linux-can@vger.kernel.org, netdev@vger.kernel.org Subject: Re: [PATCH v3 5/6] can: c_can: prepare to up the message objects number Message-ID: <20210301113805.jylhc373sip7zmed@pengutronix.de> References: <20210228103856.4089-1-dariobin@libero.it> <20210228103856.4089-6-dariobin@libero.it> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="gio4biqmwgyksd3b" Content-Disposition: inline In-Reply-To: <20210228103856.4089-6-dariobin@libero.it> X-SA-Exim-Connect-IP: 2001:67c:670:201:5054:ff:fe8d:eefb X-SA-Exim-Mail-From: mkl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --gio4biqmwgyksd3b Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 28.02.2021 11:38:54, Dario Binacchi wrote: [...] > @@ -730,7 +728,7 @@ static void c_can_do_tx(struct net_device *dev) > while ((idx =3D ffs(pend))) { > idx--; > pend &=3D ~(1 << idx); > - obj =3D idx + C_CAN_MSG_OBJ_TX_FIRST; > + obj =3D idx + priv->msg_obj_tx_first; > c_can_inval_tx_object(dev, IF_TX, obj); > can_get_echo_skb(dev, idx, NULL); > bytes +=3D priv->dlc[idx]; > @@ -740,7 +738,7 @@ static void c_can_do_tx(struct net_device *dev) > /* Clear the bits in the tx_active mask */ > atomic_sub(clr, &priv->tx_active); > =20 > - if (clr & (1 << (C_CAN_MSG_OBJ_TX_NUM - 1))) > + if (clr & (1 << (priv->msg_obj_tx_num - 1))) Do we need 1UL here, too? Marc --=20 Pengutronix e.K. | Marc Kleine-Budde | Embedded Linux | https://www.pengutronix.de | Vertretung West/Dortmund | Phone: +49-231-2826-924 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | --gio4biqmwgyksd3b Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEK3kIWJt9yTYMP3ehqclaivrt76kFAmA80hsACgkQqclaivrt 76mTjwgAjYdzda2YtABzA/9yvyzaDluI9ndyZkhugokR4iMZavmnTRaG3sPc95Ef lqiwgA3kRNfpev6f7KFfIY8dqJo0BC82ao2HYuNO9V8dBrqlH7I/w/x++LfnRNc7 sDCxKDGKHH67/uXfDP3AtdOM0Tqn0lRTC2IQ9qRrDpBU7SPN+ek50FyzHTKuT0QO I+nK9MclCqwHyeJM8GP8t1DuC2oHeaTVisC89mEJF6VGRuAhLGUmBFfL1sinTMAD oz8XBWfsERqY81LFKIRCWKon+274r38MNbTxsaz8wm9D/PF/gHjJ0DUPmMIt20Tt 1Uxa8AB5n7bpDmOtzyAmfhHPxZfCZw== =kVG6 -----END PGP SIGNATURE----- --gio4biqmwgyksd3b--