From mboxrd@z Thu Jan 1 00:00:00 1970 From: Oliver Neukum Subject: Re: [PATCH] USB: net: Fix asix read transfer buffer allocations. Date: Mon, 22 Oct 2007 19:29:03 +0200 Message-ID: <200710221929.04035.oliver@neukum.org> References: <20071022155053.GA28526@ru.mvista.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Cc: netdev@vger.kernel.org To: linux-usb-devel@lists.sourceforge.net Return-path: In-Reply-To: <20071022155053.GA28526@ru.mvista.com> Content-Disposition: inline List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-usb-devel-bounces@lists.sourceforge.net Errors-To: linux-usb-devel-bounces@lists.sourceforge.net List-Id: netdev.vger.kernel.org Am Montag 22 Oktober 2007 schrieb Valentine Barshak: > =A0static int asix_mdio_read(struct net_device *netdev, int phy_id, int l= oc) > =A0{ > =A0=A0=A0=A0=A0=A0=A0=A0struct usbnet *dev =3D netdev_priv(netdev); > +=A0=A0=A0=A0=A0=A0=A0void *buf; > =A0=A0=A0=A0=A0=A0=A0=A0u16 res; > =A0 > =A0=A0=A0=A0=A0=A0=A0=A0mutex_lock(&dev->phy_mutex); > =A0=A0=A0=A0=A0=A0=A0=A0asix_set_sw_mii(dev); > + > +=A0=A0=A0=A0=A0=A0=A0buf =3D kmalloc(2, GFP_KERNEL); This is done under lock. Can you allocate the buffer once and reuse it? Regards Oliver ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel