From patchwork Fri Sep 21 10:39:28 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Haakon Bugge X-Patchwork-Id: 973148 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="vM5U66kX"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 42Gqr63zf0z9sCS for ; Fri, 21 Sep 2018 20:40:38 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389776AbeIUQ22 (ORCPT ); Fri, 21 Sep 2018 12:28:28 -0400 Received: from userp2130.oracle.com ([156.151.31.86]:50672 "EHLO userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726479AbeIUQ21 (ORCPT ); Fri, 21 Sep 2018 12:28:27 -0400 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w8LAdgbt085730; Fri, 21 Sep 2018 10:39:42 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=yywmGyJZCmjFMbqU6wFiXfF8xbFENHtIXjLxjwSCU8A=; b=vM5U66kX3mcmNj75sNY0/K3RzMDgpJU4cUCn1QPBGHJPhaGiHgB4nVE7xcAOiMTsUqsT S7KhWVDFvrJx2ADsE4+0Yus7HiKlaIfnQ9pLizfcPTvdExeb1wFr6iHzlUOixNjcf/5c zqOBN4yK6CErWnBL8oEEEKh81s7dzJLT2Kx4lwOa0eueSEVta4/9IudqNCj83N84yysY L7ohaN1kEjRLI3pe6dI5ApY+fbZzzvIuFOburaxgQlcB3BJHJd3cdUnT6r3CL8TaoDH+ LyQ7J3Z50OUObI0OkFOhDU7XqRx+k88lCUlJEcO8BEESYh1cb4vnIH24FwWZBcceA4ei 9w== Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by userp2130.oracle.com with ESMTP id 2mmkm22cuq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 21 Sep 2018 10:39:42 +0000 Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userv0021.oracle.com (8.14.4/8.14.4) with ESMTP id w8LAdfCo030757 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 21 Sep 2018 10:39:41 GMT Received: from abhmp0001.oracle.com (abhmp0001.oracle.com [141.146.116.7]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w8LAde11026297; Fri, 21 Sep 2018 10:39:40 GMT Received: from lab02.no.oracle.com (/10.172.144.56) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 21 Sep 2018 03:39:40 -0700 From: =?utf-8?q?H=C3=A5kon_Bugge?= To: "David S . Miller" , Alexey Kuznetsov , Hideaki YOSHIFUJI Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org Subject: [PATCH 0/2] net: if_arp: use define instead of hard-coded value Date: Fri, 21 Sep 2018 12:39:28 +0200 Message-Id: <20180921103930.1420679-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=9022 signatures=668707 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=503 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1809210112 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. 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