From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752987AbdCNRbL (ORCPT ); Tue, 14 Mar 2017 13:31:11 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:36219 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750991AbdCNRbI (ORCPT ); Tue, 14 Mar 2017 13:31:08 -0400 Subject: Re: [PATCH net-next 09/12] net: bcmgenet: return EOPNOTSUPP for unknown ioctl commands To: David Laight , "f.fainelli@gmail.com" References: <20170314004142.4746-1-opendmb@gmail.com> <20170314004142.4746-10-opendmb@gmail.com> <063D6719AE5E284EB5DD2968C1650D6DCFFB052E@AcuExch.aculab.com> Cc: "robh+dt@kernel.org" , "mark.rutland@arm.com" , "davem@davemloft.net" , "rafal@milecki.pl" , "xow@google.com" , "joel@jms.id.au" , "jon.mason@broadcom.com" , "netdev@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "pgynther@google.com" , "jaedon.shin@gmail.com" From: Doug Berger Message-ID: <07283b51-ef2b-92f8-88c2-3803c6f9c81b@gmail.com> Date: Tue, 14 Mar 2017 10:31:00 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <063D6719AE5E284EB5DD2968C1650D6DCFFB052E@AcuExch.aculab.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03/14/2017 04:04 AM, David Laight wrote: > From: Doug Berger >> Sent: 14 March 2017 00:42 >> This commit changes the ioctl handling behavior to return the >> EOPNOTSUPP error code instead of the EINVAL error code when an >> unknown ioctl command value is detected. >> >> It also removes some redundant parsing of the ioctl command value >> and allows the SIOCSHWTSTAMP value to be handled. > > A better description would seem to be: > Remove checks on ioctl command and just forward all ioctl requests > to phy_mii_ioctl(). That is a good description of the code change, but I felt that was clearly conveyed by the patch content. I thought it would be a better use of the comment to describe the more subtle functional change that might be less clear. > > I also thought the 'generic' response to an unknown ioctl command > was ENOTTY. and I think it probably helped solicit this feedback :). I would have thought that error makes more sense if there is no ioctl handler, but I will definitely look into it. Thanks for the feedback, Doug