Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1405263pxk; Fri, 2 Oct 2020 08:47:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxS7YyS3fsVwxdl7ti/uR8qJL2MLFsCgYLYrYECKX28S93bDsxdZqwckT6CySltA2HPMBGB X-Received: by 2002:a17:906:31d4:: with SMTP id f20mr2899241ejf.38.1601653666540; Fri, 02 Oct 2020 08:47:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601653666; cv=none; d=google.com; s=arc-20160816; b=w1nj279DvCRNAfcREskHNcD2XJD+u8+i74j2JmudE9W/h+M6uqE9Atm6EN8aKK8cD5 ktPhM2kz17Mp0NL5Gj5KFp8hFJTsquPfCY0mK4SEMyWwXZNmENi24m/oTuZPjfaSlTue 6NRUcz3whQcnfNfTukh0JfqY7JVzR11byXGDoL1ps1D4Fj5TG+FoxUML6api3z8rxJ10 cnIMW+DQH2zJtY4BlfWUc8PrylKJkv9gguLrQZhDD9IbnfqGFbT8OZfkeRw8JAfes59l umlaFMdR6I37Hi9njpYmR2Ux3fGEO9BhkZforWGFWfb5G+7cgSWRfUZGP0JI/xRe8jFV hc1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=vGn7zM4l7lVKgWxX7ilxnSqBLUN3cciTluwTkWfEHv4=; b=jFPzfHVoMUmE0rFVmLwOVkNoikI/uSRD3PPdeArGVPpdrOkQw1ykm9lconvgEE0zym PbpCM0yMrT81/ddEwFnQMbPnRAviV31i/S2Bgli5iPzukXYC2nXL5+KUa10mBCgLuI96 pLAkpwb42ErkWc7ptUWccNigYziSGWsivkx83plDcn2GfGe7hixu0ZM+pK1ZDxnA3NkG /hy+yOlCbV+dRogWR7n5qGUWYSr0/8T07gjho/50uTemFVmH5PbTH+uqIHEuPLNo3U2d H6S6c/+uvzlOHEcTbj7WxCtetBqbrwK3xBYRIrJO1QRONOJta036hsx5+kSxMCescWb+ fIOQ== 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 p89si1310519edd.109.2020.10.02.08.47.24; Fri, 02 Oct 2020 08:47:46 -0700 (PDT) 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 S1726569AbgJBPq2 (ORCPT + 99 others); Fri, 2 Oct 2020 11:46:28 -0400 Received: from smtp13.smtpout.orange.fr ([80.12.242.135]:49318 "EHLO smtp.smtpout.orange.fr" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2387692AbgJBPq2 (ORCPT ); Fri, 2 Oct 2020 11:46:28 -0400 Received: from tomoyo.flets-east.jp ([153.230.197.127]) by mwinf5d76 with ME id b3mJ2300C2lQRaH033mMF8; Fri, 02 Oct 2020 17:46:25 +0200 X-ME-Helo: tomoyo.flets-east.jp X-ME-Auth: bWFpbGhvbC52aW5jZW50QHdhbmFkb28uZnI= X-ME-Date: Fri, 02 Oct 2020 17:46:25 +0200 X-ME-IP: 153.230.197.127 From: Vincent Mailhol To: linux-kernel@vger.kernel.org, netdev@vger.kernel.org, linux-can@vger.kernel.org, Wolfgang Grandegger , Marc Kleine-Budde , "David S . Miller" Cc: Vincent Mailhol , Jakub Kicinski , Oliver Neukum , Greg Kroah-Hartman , Masahiro Yamada , Arunachalam Santhanam , linux-usb@vger.kernel.org (open list:USB ACM DRIVER) Subject: [PATCH v3 2/7] can: dev: fix type of get_can_dlc() and get_canfd_dlc() macros Date: Sat, 3 Oct 2020 00:41:46 +0900 Message-Id: <20201002154219.4887-3-mailhol.vincent@wanadoo.fr> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201002154219.4887-1-mailhol.vincent@wanadoo.fr> References: <20200926175810.278529-1-mailhol.vincent@wanadoo.fr> <20201002154219.4887-1-mailhol.vincent@wanadoo.fr> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The macros get_can_dlc() and get_canfd_dlc() are not visible in userland. As such, type u8 should be preferred over type __u8. Reference: https://lkml.org/lkml/2020/10/1/708 Signed-off-by: Vincent Mailhol --- include/linux/can/dev.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/linux/can/dev.h b/include/linux/can/dev.h index 5e3d45525bd3..132b4133f9d0 100644 --- a/include/linux/can/dev.h +++ b/include/linux/can/dev.h @@ -84,13 +84,13 @@ struct can_priv { /* * get_can_dlc(value) - helper macro to cast a given data length code (dlc) - * to __u8 and ensure the dlc value to be max. 8 bytes. + * to u8 and ensure the dlc value to be max. 8 bytes. * * To be used in the CAN netdriver receive path to ensure conformance with * ISO 11898-1 Chapter 8.4.2.3 (DLC field) */ -#define get_can_dlc(i) (min_t(__u8, (i), CAN_MAX_DLC)) -#define get_canfd_dlc(i) (min_t(__u8, (i), CANFD_MAX_DLC)) +#define get_can_dlc(i) (min_t(u8, (i), CAN_MAX_DLC)) +#define get_canfd_dlc(i) (min_t(u8, (i), CANFD_MAX_DLC)) /* Check for outgoing skbs that have not been created by the CAN subsystem */ static inline bool can_skb_headroom_valid(struct net_device *dev, -- 2.26.2