Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754544AbbGPIpQ (ORCPT ); Thu, 16 Jul 2015 04:45:16 -0400 Received: from mailout1.samsung.com ([203.254.224.24]:60254 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753804AbbGPIpM (ORCPT ); Thu, 16 Jul 2015 04:45:12 -0400 X-AuditID: cbfee68d-f79106d00000728c-a6-55a76f164cae Date: Thu, 16 Jul 2015 08:45:09 +0000 (GMT) From: Maninder Singh Subject: Re: [RESEND PATCH 1/1] staging:vt6655: remove checks around dev_kfree_skb To: Dan Carpenter Cc: "forest@alittletooquiet.net" , "gregkh@linuxfoundation.org" , "devel@driverdev.osuosl.org" , "gclement@baobob.org" , "tvboxspy@gmail.com" , "linux-kernel@vger.kernel.org" , "joe@perches.com" , PANKAJ MISHRA Reply-to: maninder1.s@samsung.com MIME-version: 1.0 X-MTR: 20150716083444487@maninder1.s Msgkey: 20150716083444487@maninder1.s X-EPLocale: en_US.windows-1252 X-Priority: 3 X-EPWebmail-Msg-Type: personal X-EPWebmail-Reply-Demand: 0 X-EPApproval-Locale: X-EPHeader: ML X-MLAttribute: X-RootMTR: 20150716083444487@maninder1.s X-ParentMTR: X-ArchiveUser: X-CPGSPASS: N X-ConfirmMail: N,general Content-type: text/plain; charset=windows-1252 MIME-version: 1.0 Message-id: <686357594.854551437036306449.JavaMail.weblogic@ep2mlwas07d> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrGIsWRmVeSWpSXmKPExsWyRsSkWlcsf3mowYRZmhaXd81hc2D0+LxJ LoAxissmJTUnsyy1SN8ugSuj9/YJxoIX/BWbr7axNzBu4O9i5OQQElCTWLT3MRuILSFgIvFn Qh87hC0mceHeeqA4F1DNUkaJjy3XGGGK1r2/ygiRmMMocf7tFlaQBIuAqsTs1U9YQGw2AX2J s3vXMXcxcnAICwRJvDjlCxIWEdCTuHPiKAtIL7PAUmaJ/p+7GCGuU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4YKs4vcez2DqheAYmpZw5C1WhK3NrTAvUwn8SahW9ZYOp3nVrO DLPr/pa5UL0SEltbnoD9zgx0/5Tuh+wQtoHEkUVzWNH9wivgIfFj83fmCYyys5CkZiFpn4Wk HVnNAkaWVYyiqQXJBcVJ6RVGesWJucWleel6yfm5mxjBiejZoh2M/85bH2IU4GBU4uHd8GNZ qBBrYllxZe4hRgkOZiUR3qeey0OFeFMSK6tSi/Lji0pzUosPMZoCY20is5Rocj4wSeaVxBsa m5ibGptaGBiam5spifP+P5cbIiSQnliSmp2aWpBaBNPHxMEp1cC4/8r3SA2ro0wik1++UZ1U OHnjlBuat+evfqjULR9zz/KmL2eS8Rt1vZN9c0ITmqzMtpZPXvVlx3UjjZl11w4V/DTbefR/ afSvhxPSZOfeCa0pXmbrZ3ftmd3Vrc51/t48Zz39krkf161JPOBoVp6n+kFtTtU+7mSRRVqh E4++ltV7L7L905liJZbijERDLeai4kQA1ZofO1oDAAA= DLP-Filter: Pass X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by mail.home.local id t6G8jMLX008685 Content-Length: 1594 Lines: 42 Hi Dan, >I hate these patches. I have told Markus to stop sending them but he >has issues so now I only complain when they introduce a bug. There was >one bug I have missed because it was a benchmark regression and I knew >it was theoretically possible but I didn't know the code well enough to >say which were fast paths... >My main objection is that relying on the sanity check inside the >function call makes the code more subtle to understand. We know we need >a NULL check but it is hidden away in another file. The motivation for >this patch you are sending is "There is a sanity check in dev_kfree_skb() >so let's do an insane thing and save some lines of code." >For this particular patch we assume throughout the whole driver that >"pTDInfo->skb" can be NULL so making it inconsistent in this one place >is wrong Agreed, But these changes are suggested because:- where we are checking for (pTDInfo->skb), we are using it in above line. and it does not look good, thats why we should remove thse checks and i have suggested changes. code snippet:- ----------------------- if (pTDInfo->skb_dma && (pTDInfo->skb_dma != pTDInfo->buf_dma)) dma_unmap_single(&pDevice->pcid->dev, pTDInfo->skb_dma, pTDInfo->skb->len, DMA_TO_DEVICE); ----> In this we did not check for pTDInfo->skb if (pTDInfo->skb) dev_kfree_skb(pTDInfo->skb); But if am wrong, sorry for the patch. Thanks, Maninder ............????{.n?+???????+%?????ݶ??w??{.n?+????{??G?????{ay?ʇڙ?,j??f???h?????????z_??(?階?ݢj"???m??????G????????????&???~???iO???z??v?^?m???? ????????I?