From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932101AbbDOJdE (ORCPT ); Wed, 15 Apr 2015 05:33:04 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:41607 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753489AbbDOJcx (ORCPT ); Wed, 15 Apr 2015 05:32:53 -0400 Date: Wed, 15 Apr 2015 12:32:20 +0300 From: Dan Carpenter To: Sudip Mukherjee Cc: devel@driverdev.osuosl.org, One Thousand Gnomes , Wolfram Sang , Greg Kroah-Hartman , Jonathan Corbet , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-i2c@vger.kernel.org, Willy Tarreau , Jean Delvare Subject: Re: [PATCH 1/4] parport: modify parport subsystem to use devicemodel Message-ID: <20150415093220.GK10964@mwanda> References: <1429084124-2271-1-git-send-email-sudipm.mukherjee@gmail.com> <1429084124-2271-2-git-send-email-sudipm.mukherjee@gmail.com> <20150415082746.GI10964@mwanda> <20150415092055.GA3198@sudip-PC> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150415092055.GA3198@sudip-PC> User-Agent: Mutt/1.5.21 (2010-09-15) X-Source-IP: userv0022.oracle.com [156.151.31.74] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 15, 2015 at 02:50:55PM +0530, Sudip Mukherjee wrote: > this PARPORT_DEVPROC_REGISTERED flag is cleared in parport_unregister_device() > and is set in parport_register_dev[ice], so when we call > parport_register_device() or parport_register_dev() it will be not set > and the condition will always be true. The question of how to handle impossible conditions is always tricky. :P In this case just remove the condition. regards, dan carpenter From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dan Carpenter Subject: Re: [PATCH 1/4] parport: modify parport subsystem to use devicemodel Date: Wed, 15 Apr 2015 12:32:20 +0300 Message-ID: <20150415093220.GK10964@mwanda> References: <1429084124-2271-1-git-send-email-sudipm.mukherjee@gmail.com> <1429084124-2271-2-git-send-email-sudipm.mukherjee@gmail.com> <20150415082746.GI10964@mwanda> <20150415092055.GA3198@sudip-PC> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <20150415092055.GA3198@sudip-PC> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: driverdev-devel-bounces@linuxdriverproject.org Sender: "devel" To: Sudip Mukherjee Cc: devel@driverdev.osuosl.org, One Thousand Gnomes , Jonathan Corbet , Wolfram Sang , Greg Kroah-Hartman , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-i2c@vger.kernel.org, Willy Tarreau , Jean Delvare List-Id: linux-i2c@vger.kernel.org On Wed, Apr 15, 2015 at 02:50:55PM +0530, Sudip Mukherjee wrote: > this PARPORT_DEVPROC_REGISTERED flag is cleared in parport_unregister_device() > and is set in parport_register_dev[ice], so when we call > parport_register_device() or parport_register_dev() it will be not set > and the condition will always be true. The question of how to handle impossible conditions is always tricky. :P In this case just remove the condition. regards, dan carpenter