Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp416795pxb; Wed, 3 Mar 2021 06:35:50 -0800 (PST) X-Google-Smtp-Source: ABdhPJzH8qFVS1+t9RpHL33Bzefq2fBBhJR/2W+IRI3AH1Sbg81Qj2vXslLKIr6if8hIgiq6GHcp X-Received: by 2002:aa7:dc4e:: with SMTP id g14mr6814379edu.114.1614782150261; Wed, 03 Mar 2021 06:35:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614782150; cv=none; d=google.com; s=arc-20160816; b=FwhOMHh/w/Y+ctHSv/jbe0AavzvIp4yKFvb3oGIpqnhFBmi14w3Ndn8q2wix/PshXm 7KgCjPXAHqTmap3pFJbx11V5/WGfkNdTWTEPlBgM6HcedbOh0ZEvUe9vy73RFNUp5000 c5Hra4T8jdFOEXn8ynawKD0OKl3csLjHSTh4GMJ20fne/xk4lCSbnvdOBlIEicCMt4St x/RezHN/DS2u5+wUkM6e7F9movNMizPTQ/K5w8/5HF0xZ5i/TEFKUvfFQlDPgGrFzqEy KgY8yV/ME/B3YQn+FFiCZxhSTFdIVSyvlJIsoO3gAzoP0pk9BYhc8tQZuY2RrQSoyOxT iVvQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:importance:content-transfer-encoding :mime-version:subject:references:in-reply-to:message-id:cc:to:from :date:dkim-signature; bh=ELHHirX/rHrzCr8RdE/L9KdYRZbNnQKFFnNxXi1w8EU=; b=OgJado+YGdXfUc8thxHO4uVw2S+HXpBzdim/TrxyU5/HnDPDvT1gsFBdduzA2A8+AC ge3FFrb81zDIywUJyTwhGRYv4grjDxArJSgMr+jIa8ozHs7C3mTXrTZyd/UKc0qk2BOg PkuTDCGTfaO8pjkk14V3t8L6ITXk8koo20oWaBfCJOfOpUTGNCMH6m5hfevBasZ51Rpr Dhega728ufWvy4fltuWedcasQSeoaOb72HcIQwMoF7QDq/uptgxcR5YPKHbRvS7qrj8D RccXdAmv1xzzh6wdCsmhRNTE8KCZccK2OCQGu1jzQ0v6BKQge5kHY8tix6q7kJsbi5W/ e2cA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@libero.it header.s=s2021 header.b=KwaFNDQU; 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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=libero.it Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z23si17057284edm.39.2021.03.03.06.35.16; Wed, 03 Mar 2021 06:35:50 -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; dkim=pass header.i=@libero.it header.s=s2021 header.b=KwaFNDQU; 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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=libero.it Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244452AbhCAVnl (ORCPT + 99 others); Mon, 1 Mar 2021 16:43:41 -0500 Received: from smtp-31-i2.italiaonline.it ([213.209.12.31]:47059 "EHLO libero.it" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S237309AbhCARWc (ORCPT ); Mon, 1 Mar 2021 12:22:32 -0500 Received: from oxapps-30-132.iol.local ([10.101.8.178]) by smtp-31.iol.local with ESMTPA id GmEolCaigVpAbGmEolVksZ; Mon, 01 Mar 2021 18:21:43 +0100 x-libjamoibt: 1601 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=libero.it; s=s2021; t=1614619304; bh=ELHHirX/rHrzCr8RdE/L9KdYRZbNnQKFFnNxXi1w8EU=; h=From; b=KwaFNDQUVgU9gM6pxpH76TBUQp8noyQ/Eh7w092d/TTi+bc3SmvKkSjaGfWQOwLjb KptPGEZv7hpzpLPHeo6po+7xervW5W/uvk2vswCft6vzs5tCzji40IrNZDYWiW+mZi 2IYCvK9122UJqXAELPcWNI0wbW09GBTv7et1QrbqMjogvj1PF8jYnYFriQqRN+puil ha8doJmsEfsTeaIBcJK2ZCt7mAHdeV5884hzuM+A55F6hEFpILbMe4zHSvCmNkU6FB IRtsX4B0NB/SO7Yh5f13QYgTbsWbbAk05gVHbRTEg4TB8gM5LP/PPAWV/pCJhh0jh3 8GgDRGGQQu2Iw== X-CNFS-Analysis: v=2.4 cv=WMS64lgR c=1 sm=1 tr=0 ts=603d22a8 cx=a_exe a=iUxb6lXnTT1s429i9ALYXg==:117 a=UPWQtH3J-JgA:10 a=IkcTkHD0fZMA:10 a=_gZzKa99_6AA:10 a=bGNZPXyTAAAA:8 a=bAF_0_vCazFOC95qmekA:9 a=QEXdDO2ut3YA:10 a=yL4RfsBhuEsimFDS2qtJ:22 Date: Mon, 1 Mar 2021 18:21:42 +0100 (CET) From: Dario Binacchi To: Marc Kleine-Budde 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 Message-ID: <1037673059.602534.1614619302914@mail1.libero.it> In-Reply-To: <20210301113805.jylhc373sip7zmed@pengutronix.de> References: <20210228103856.4089-1-dariobin@libero.it> <20210228103856.4089-6-dariobin@libero.it> <20210301113805.jylhc373sip7zmed@pengutronix.de> Subject: Re: [PATCH v3 5/6] can: c_can: prepare to up the message objects number MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Priority: 3 Importance: Normal X-Mailer: Open-Xchange Mailer v7.10.3-Rev27 X-Originating-IP: 87.20.116.197 X-Originating-Client: open-xchange-appsuite x-libjamsun: BbLCwLDUl8yEj6k34kETrEsxm0xv+7N3 x-libjamv: SzWzyhp462U= X-CMAE-Envelope: MS4xfBJxX6+FRTbJIR+f3u0MrRX5DYxea0av406W91FF3BXLet5O/Db3PK5csHSd4CDbiUyirNi3JI9H4yA2V24KsJSB82i8fgeEN8T0nbJEU11oCrHoMvNI 9GtzGH8wsnJnbgAV8O0ffyXV6/3sd9I3QnugSr+62lJ7SPSTJOlz6FNeAB50odDwBZ5wwQzS+JkWdz+LM+Se25wo3U/h66oQ9R+9xHt8LExJ8EqhmW2LeOAt c9Bk3PDthzG6uzRrygPJwWMRG2VPkUC8HjP9ET+wdcVfDDWbN2bEdWwk1Dx9ZDVWa3XfoqUDRkwWXfHd00xeeRn/TMNxPon6o6U7pf4E5D+dfUQlgtijP6L/ ifXdF7kL0Gjv7qsZ2ZmjmsLSqosNxsQLvTD2mRHa+d65QZLfVpNQC6w35ItpxshHj8rxV1bga0hBJ08yieDaZ69FnjyjYuttf7Ykjxa/cHc1Kf/NEWlzep97 L7YR2lHtC1Ix1LGGbJpF0VI5QjrdtKgiw0cGHW+Ju56Pugxk6sEVzllDEfDFXRkEIGHJFtIC7iIDw2UrtCWVWj17ZSrbuO/eLFSTQX8oYQt2pExvLzC6cXMt eT/ROli/IUzoZ/GzVqH5Lmw9Pm1Qofxw9mUHQY4k3TsioQ== Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Marc, > Il 01/03/2021 12:38 Marc Kleine-Budde ha scritto: > > > 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 = ffs(pend))) { > > idx--; > > pend &= ~(1 << idx); > > - obj = idx + C_CAN_MSG_OBJ_TX_FIRST; > > + obj = idx + priv->msg_obj_tx_first; > > c_can_inval_tx_object(dev, IF_TX, obj); > > can_get_echo_skb(dev, idx, NULL); > > bytes += 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); > > > > - 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? Do you agree if I use the BIT macro ? Thanks and regards Dario > > Marc > > -- > 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 |