Received: by 2002:ac0:a679:0:0:0:0:0 with SMTP id p54csp84085imp; Tue, 19 Feb 2019 18:44:09 -0800 (PST) X-Google-Smtp-Source: AHgI3IaKI786K7iabb2zpeK8536TxvaGJlx2usTlgEGaGRgKfRz5UdCfxBdXNcNuui4mKU18zJrF X-Received: by 2002:a17:902:aa06:: with SMTP id be6mr13773165plb.57.1550630649078; Tue, 19 Feb 2019 18:44:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550630649; cv=none; d=google.com; s=arc-20160816; b=io4CAsMto38/LI2HNE5eOiQ4BS5L+XS3DJnileFvqA9ma+IN/UMniUSo+852re6iyA lDDuTL7SJVEbJsQjayzOW3Npjes525Q1vJj9FGLphz/m/ihML6E5V/OuFlPiiwBRQy2b L4vDWYDnnZHg/TL+hCe3tqLBwGz4XYchadNN+I/h0LtSDrG+rhoeM62iGeBEvAUaR/YB cQMd9zgcSgibV1zb7ZkQNgI4ZmaWrzPlLwQYNpJlIaNE0nmI+LR2dX0C1BPm29UZNjjR utsDFYeQfZfeQg+lckev8XJqqstvAae6aKs74p67tEwpLlKdsbm37AJYKXxGxSar3Cri nbXQ== 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 :organization:references:in-reply-to:message-id:subject:cc:to:from :date:dkim-signature; bh=2N6hzQ59Ndqu8ZvIp+meiLzMTcx+eYDLzewIvKUgIVI=; b=rYEqPmaWw2BtGDvccIXU9VT44sI7Z/nHyAUuEsfvWES0IIyed5HqYBxTCEICIGFTVf Ey2PK84vWs9U4CAFKHixvgShyN2SE4YelfSoHRtGVikP5dn3yJqZBKBhKrBOEtQHZgDp 4/EeyT7hz1gkZ7QWXr0TVokCfSDivQxwK6rWB83AaEoxF2MVLPLVrmsA0jf/NtjLYU0X o6093ot3JhSqw8Kmwr+a7ZfF/0rsfKV1zqAJLsIU4tCY0U02/BJxlbKLfguQsV5R7B8E +99m+IRz7UbXUJc4TLcmLJJnaASUi3R+meeaI78tmudagNGms+acKar+JF7yOVUMGzZE 0v5Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@netronome-com.20150623.gappssmtp.com header.s=20150623 header.b="hwrnC/0z"; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m3si17549124pgs.8.2019.02.19.18.43.53; Tue, 19 Feb 2019 18:44:09 -0800 (PST) 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; dkim=pass header.i=@netronome-com.20150623.gappssmtp.com header.s=20150623 header.b="hwrnC/0z"; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730334AbfBTCm4 (ORCPT + 99 others); Tue, 19 Feb 2019 21:42:56 -0500 Received: from mail-qt1-f195.google.com ([209.85.160.195]:40629 "EHLO mail-qt1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727264AbfBTCmz (ORCPT ); Tue, 19 Feb 2019 21:42:55 -0500 Received: by mail-qt1-f195.google.com with SMTP id j36so25707312qta.7 for ; Tue, 19 Feb 2019 18:42:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netronome-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :organization:mime-version:content-transfer-encoding; bh=2N6hzQ59Ndqu8ZvIp+meiLzMTcx+eYDLzewIvKUgIVI=; b=hwrnC/0z/0Z8Z8BkAuyH2D39XQoTnYR+/GLjZvYefCHo1e360AohAfY7sXVwomUCM4 1E0HyLMRM3PTDcXMa9wfZvI0tUxn/LHhEMafb97i+xxvK4etNGQPhXm/zjl3iDzBK5Lm PKRbScuiE8rwHAL7EKPlTvSvv3VZ5Q7Ilukackk8X/1ihxG6yiQGl8QwLa493t8CMMB7 yqMUwrX9c7dkIFKdQPk/259eufIZMxreK9j/A7tQdYwRkZ7TwfhXON1tD7kmThjCZtsM uWwWw3iLYyMFbvblxK9hNyU6qP2lUfN64zQ9HeucAgE2oLqCwUPbIW0Btmmj//qIrhWF QwiA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:organization:mime-version:content-transfer-encoding; bh=2N6hzQ59Ndqu8ZvIp+meiLzMTcx+eYDLzewIvKUgIVI=; b=CIGcDouMxwGSHp+sxWFGC1pt331/ahKvZvKJSX0wV/xJpDojn28KE8ZcBCPx2gMQqf GRerBHIZzplhjRWnTDfFpBeiAYaJEpFUc5ICiXAQtRfRJVzBeVS/dSyx0ohzrChL+iwf mdNLzDmOdZSRRRZe71TqAuh/Cv5bElyDPTVG8h3bRnLVJMqutHzQUhrv3Z+JlRpPo89t JvHhN4FcTUDBJF/yvy2TpHRoO+0bCeMOmiKn/o1PFOMiGOLKeOtImpfhITIE9468+Y0e 0cLeDvY6lZdCFItbH5fCldMQD7DWk9xBVuInKgRf/3oD36nfRm+mDsqiZkd2AZcOnxwk HndQ== X-Gm-Message-State: AHQUAuYsDcEC/41VlKefLs5p1LsH9ETE8hN4t6mU6+YkR8sIzT+oO063 upSUvI8KrA5v3HDSmoiflSOn/g== X-Received: by 2002:ac8:2585:: with SMTP id e5mr25312192qte.233.1550630574709; Tue, 19 Feb 2019 18:42:54 -0800 (PST) Received: from cakuba.netronome.com ([66.60.152.14]) by smtp.gmail.com with ESMTPSA id 24sm7514148qtu.17.2019.02.19.18.42.53 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 19 Feb 2019 18:42:54 -0800 (PST) Date: Tue, 19 Feb 2019 18:42:46 -0800 From: Jakub Kicinski To: Michal Kubecek Cc: netdev@vger.kernel.org, David Miller , Andrew Lunn , Jiri Pirko , linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH net-next v3 08/21] ethtool: generic handlers for GET requests Message-ID: <20190219184246.276f94ce@cakuba.netronome.com> In-Reply-To: <99e5e578d2a554bb2bfd9ee04984ff54f8320b43.1550513384.git.mkubecek@suse.cz> References: <99e5e578d2a554bb2bfd9ee04984ff54f8320b43.1550513384.git.mkubecek@suse.cz> Organization: Netronome Systems, Ltd. MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 18 Feb 2019 19:22:04 +0100 (CET), Michal Kubecek wrote: > +static struct common_req_info *alloc_get_data(const struct get_request_ops *ops) nit: IMHO prefixing all structures and functions with a common phrase (ethnl) makes the code easier to navigate. > +{ > + struct common_req_info *req_info = kmalloc(ops->data_size, GFP_KERNEL); > + > + if (!req_info) > + return NULL; nit: please avoid calling complex functions inline, especially if the result has to be error checked