From patchwork Tue Oct 9 14:27:22 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Haakon Bugge X-Patchwork-Id: 981311 Return-Path: X-Original-To: patchwork-incoming-netdev@ozlabs.org Delivered-To: patchwork-incoming-netdev@ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=oracle.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=oracle.com header.i=@oracle.com header.b="NBDh0ONJ"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 42V0265prkz9s8r for ; Wed, 10 Oct 2018 01:27:58 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726780AbeJIVpE (ORCPT ); Tue, 9 Oct 2018 17:45:04 -0400 Received: from userp2120.oracle.com ([156.151.31.85]:36196 "EHLO userp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726393AbeJIVpD (ORCPT ); Tue, 9 Oct 2018 17:45:03 -0400 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w99EQxT3145908; Tue, 9 Oct 2018 14:27:40 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : mime-version : content-type : content-transfer-encoding; s=corp-2018-07-02; bh=xv3dsR3XrRJvmNRNG5ZMgstXPyFS5XUcTTYsP8LeZik=; b=NBDh0ONJD5AgSdNHeBe1zrBjbJA9962Lx6/qNIen63T74C22h2586/D+uNUBCzxMR5+U 2zHtnzi8//Ut8+KyVzNiZmY8Kp3DF4ViWZ8SW4fSg1gsGwYg9xr5IGK26wMDqJR1RRnj KUek7LNQlasm6QZ+l0cPPJe47/Bfu6Nb1vwYKFHLx3IWiT8gX7JVj6yQxz85f5wk0SaA kcUKqfCWT35gTgr4j82WbuuakPibdMB/UQB85Wnb+0qIRqmBW3tXdCGB3F0Yem7aDf6T ShNpNpEb/iFoU46JcRvlprqO7OjvuMwVVW85bEPlQ/kvJ0Mg2yhqa18rB5bBKSvy4I/f SA== Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by userp2120.oracle.com with ESMTP id 2mxnpqwjkd-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 09 Oct 2018 14:27:39 +0000 Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w99ERYKw029348 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 9 Oct 2018 14:27:34 GMT Received: from abhmp0002.oracle.com (abhmp0002.oracle.com [141.146.116.8]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id w99ERXf1023762; Tue, 9 Oct 2018 14:27:33 GMT Received: from lab02.no.oracle.com (/10.172.144.56) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 09 Oct 2018 14:27:32 +0000 From: =?utf-8?q?H=C3=A5kon_Bugge?= To: netdev@vger.kernel.org Cc: stephen@networkplumber.org, "David S . Miller" , Kate Stewart , Thomas Gleixner , Greg Kroah-Hartman , Philippe Ombredanne , linux-kernel@vger.kernel.org Subject: [PATCH v2 0/2] net: if_arp: use define instead of hard-coded value Date: Tue, 9 Oct 2018 16:27:22 +0200 Message-Id: <20181009142724.2213012-1-Haakon.Bugge@oracle.com> X-Mailer: git-send-email 2.14.3 MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9040 signatures=668706 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=1 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=327 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1810090142 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Struct arpreq contains the name of the device. All other places in the kernel, the define IFNAMSIZ is used to designate its size. But in if_arp.h, a literal constant is used. Fixed by explicitly including uapi/linu/if.h, where IFNAMSIZ is defined. The series also fixes some incorrect indents. v1 -> v2: * Include uapi/linux/if.h from if_arp.h * Added Stephen's t-b Håkon Bugge (2): net: if_arp: Fix incorrect indents net: if_arp: use define instead of hard-coded value include/uapi/linux/if_arp.h | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) --- 2.14.3 From a36b99413ea5beca1539f4faf065f33c7c19e6a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon=20Bugge?= Date: Fri, 21 Sep 2018 11:28:36 +0200 Subject: [PATCH 0/2] MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Struct arpreq contains the name of the device. All other places in the kernel, the define IFNAMSIZ is used to designate its size. But in if_arp.h, a literal constant is used. As it could be good reasons to use constants instead of the defines in include files under uapi, it seems to be OK to use the define here, without opening a can of worms in user-land. This because if_arp.h includes netdevice.h, which also uses IFNAMSIZ. For the distros I have checked, this also holds true for the use-land side. The series also fixes some incorrect indents. Håkon Bugge (2): net: if_arp: Fix incorrect indents net: if_arp: use define instead of hard-coded value include/uapi/linux/if_arp.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) -- 2.14.3