From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752438AbbCXM60 (ORCPT ); Tue, 24 Mar 2015 08:58:26 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:26580 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752323AbbCXM6Y (ORCPT ); Tue, 24 Mar 2015 08:58:24 -0400 Date: Tue, 24 Mar 2015 15:58:27 +0300 From: Dan Carpenter To: Sudip Mukherjee Cc: Benjamin Romer , David Kershner , Greg Kroah-Hartman , devel@driverdev.osuosl.org, sparmaintainer@unisys.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH v4 3/4] staging: unisys: use local variable instead of global Message-ID: <20150324125827.GT10964@mwanda> References: <1427199457-11771-1-git-send-email-sudipm.mukherjee@gmail.com> <1427199457-11771-3-git-send-email-sudipm.mukherjee@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1427199457-11771-3-git-send-email-sudipm.mukherjee@gmail.com> 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 I don't like how these are broken up at all. It's random grab bag of renaming and deleting. Do it like this, perhaps: [patch 1] delete registered Leave the if (MAJOR(majordev) >= 0) for now, because it just confuses issues to mix it in. Delete all references to registered. [patch 1] use local variable in visorchipset_file_init() Don't delete anything. [patch 2] pass major_dev to visorchipset_file_cleanup() This deletes the "if (MAJOR(majordev) >= 0)" condition because it's obvious that can't be true. This deletes all references to the "majordev" global because that isn't needed any more. The whole reason it was needed originally was because of visorchipset_file_cleanup() so it's wrong to do the deleting in this patch which is about visorchipset_file_init(). regards, dan carpenter