Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp183962ybl; Thu, 29 Aug 2019 21:12:11 -0700 (PDT) X-Google-Smtp-Source: APXvYqxEX4aZ6YPjF5Vb7taZa24xsteLH/hupujVnBfog9s3o7v59SF7w0IHY04X+LShVy/jIaSt X-Received: by 2002:a62:76d5:: with SMTP id r204mr15455188pfc.252.1567138331833; Thu, 29 Aug 2019 21:12:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567138331; cv=none; d=google.com; s=arc-20160816; b=TJ45wipenMh2Nh9Z4jHJuFlZQ7zk5QoqIIA6F+pQyyFlNzhwm705x2ZJcTn4eq2XFQ SIcouXLwF25ByQ0wF8yhiNQWrAefo49u6rLt3dMHBVl8U6eZHzmkkrTIt5UKjh1INPvk vpvq8Sfd8WSjjd9Pg/+q7JgUUqPaNeiUy+9RLnR4dGdcx2Wn/57ZZ640XDK7ujaxXjP7 GXTd8gSd1ZZljCp69V43JBt6rWM4aq+HjhUqHtOcvaIZWWYykyrvTqB8c5JoH/OyySKP Bn9Crwhx9JAM63ms5TO/rYvdyJl1SFtmsHhDR6ta+JrnWNAERLHX6XJSWoKnvXXVssf7 nr4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=5FTiZxoYChVtkFi7Uzsbp80MHaP5uHc5oFUltTla1eQ=; b=c2LtnYfYc4AAJQAxoEvyXm/IjkscNXU4nxRpfLxQ5l5FjvBdsd/S0j+grQ+dHP5eFB rBZQMBDTrEWwiaZTuw4XSNUvhIjBiFfcb/+dTcNTi9YwBXON6wAlso/yiClutkJckqsE DZ7+/lQvLqoOGcjfHMQ5pCynv72m0TOkLtI3BYJl6eVztKnWcDoMSHc60Bj9IwekxCEh yODanbfVOij/tThi8jVpGFsev3oZHaPQHGaOfsy+pcpTrFlN5c1GEw675GbYJdy5jJHO fRHqzWJ3k9vVAE95Vcnne0bXHpiIqXSbSTFrYzcAglEjoOtyvALF+BrxjIcZGO13WhOR +IAg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mellanox.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id bb14si3907178pjb.66.2019.08.29.21.11.56; Thu, 29 Aug 2019 21:12:11 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mellanox.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726849AbfH3EKv (ORCPT + 99 others); Fri, 30 Aug 2019 00:10:51 -0400 Received: from mail-il-dmz.mellanox.com ([193.47.165.129]:42719 "EHLO mellanox.co.il" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725808AbfH3EKu (ORCPT ); Fri, 30 Aug 2019 00:10:50 -0400 Received: from Internal Mail-Server by MTLPINE1 (envelope-from parav@mellanox.com) with ESMTPS (AES256-SHA encrypted); 30 Aug 2019 07:10:45 +0300 Received: from sw-mtx-036.mtx.labs.mlnx (sw-mtx-036.mtx.labs.mlnx [10.12.150.149]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id x7U4AiD9010368; Fri, 30 Aug 2019 07:10:44 +0300 From: Parav Pandit To: linux-kernel@vger.kernel.org, jiri@mellanox.com Cc: Parav Pandit Subject: [PATCH internal net-next 0/2] Minor refactor in devlink Date: Thu, 29 Aug 2019 23:10:33 -0500 Message-Id: <20190830041035.60581-1-parav@mellanox.com> X-Mailer: git-send-email 2.19.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Two minor refactors in devlink. Patch-1 Explicitly defines devlink port index as unsigned int Patch-2 Uses switch-case to handle different port flavours attributes Parav Pandit (2): devlink: Make port index data type as unsigned int devlink: Use switch-case instead of if-else include/net/devlink.h | 2 +- net/core/devlink.c | 44 ++++++++++++++++++++++++------------------- 2 files changed, 26 insertions(+), 20 deletions(-) -- 2.19.2