From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753425AbcBVG6J (ORCPT ); Mon, 22 Feb 2016 01:58:09 -0500 Received: from webbox1416.server-home.net ([77.236.96.61]:56953 "EHLO webbox1416.server-home.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750774AbcBVG6H (ORCPT ); Mon, 22 Feb 2016 01:58:07 -0500 X-Greylist: delayed 413 seconds by postgrey-1.27 at vger.kernel.org; Mon, 22 Feb 2016 01:58:06 EST From: Alexander Stein To: linux-kernel@vger.kernel.org Cc: Colin King , Larry Finger , Chaoming Li , Kalle Valo , Priit Laes , linux-wireless@vger.kernel.org, netdev@vger.kernel.org Subject: Re: [PATCH] rtlwifi: pass struct rtl_stats by reference as it is more efficient Date: Mon, 22 Feb 2016 07:51:08 +0100 Message-ID: <1498532.AoNxxa1Kry@ws-stein> User-Agent: KMail/4.14.8 (Linux/4.1.15-gentoo-r1; KDE/4.14.8; x86_64; ; ) In-Reply-To: <1456006227-10709-1-git-send-email-colin.king@canonical.com> References: <1456006227-10709-1-git-send-email-colin.king@canonical.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Saturday 20 February 2016 22:10:27, Colin King wrote: > From: Colin Ian King > > passing rtl_stats by value is inefficient; the structure is over 300 > bytes in size and generally just one field (packet_report_type) > is being accessed, so the pass by value is a relatively large overhead. > This change just affects just the rx_command_packet calls. Why not using a const pointer? Best regards, Alexander