From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753345AbbCXFgV (ORCPT ); Tue, 24 Mar 2015 01:36:21 -0400 Received: from mail-pa0-f47.google.com ([209.85.220.47]:34002 "EHLO mail-pa0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751997AbbCXFgU (ORCPT ); Tue, 24 Mar 2015 01:36:20 -0400 Date: Tue, 24 Mar 2015 11:06:08 +0530 From: Sudip Mukherjee To: Greg Kroah-Hartman Cc: Benjamin Romer , David Kershner , *S-Par-Maintainer , "open list:STAGING SUBSYSTEM" , linux-kernel Subject: Re: [PATCH] staging: unisys: handle major number properly Message-ID: <20150324053608.GA4640@sudip-PC> References: <1426604484-7770-1-git-send-email-sudipm.mukherjee@gmail.com> <20150323210440.GA22956@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150323210440.GA22956@kroah.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 23, 2015 at 10:04:40PM +0100, Greg Kroah-Hartman wrote: > On Tue, Mar 17, 2015 at 08:31:24PM +0530, Sudip Mukherjee wrote: > > This doesn't apply anymore, due to other changes recently to this > driver. > > But even if it did, I don't think it is correct. I really don't > understand what you are trying to do here. I think you just merged two > different major numbers togther, which isn't good at all. But if you > didn't, then why is this patch doing different things to different files > (hint, only do one thing per file.) > > Also, why does the driver have multiple major numbers? Isn't a single > major good enough? How many does it need? For what does it use them > for? but, according to my understanding the driver is having only one major number. visorchipset_major is the major number defined in visorchipset_main.c as a module parameter. The original code in visorchipset_main.c was creating dev_t from this major number and calling the function visorchipset_file_init(), which is in file.c with the dev_t as an argument. Now visorchipset_file_init(), it is registering that dev_t as a char driver and storing it in a static variable so that it can reuse that dev_t in visorchipset_file_cleanup(). My patch is just passing the major and minor number as argument to visorchipset_file_init() which is creating that dev_t while registering. and instead of storing it again as a static variable i am using Visorchipset_platform_device.dev.devt while calling the cleanup(). now since all are related to only one change so it all came in a single patch. is my understanding correct or am i missing something here? regards sudip > > Totally confused, > > greg k-h