From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755038AbbFOVFH (ORCPT ); Mon, 15 Jun 2015 17:05:07 -0400 Received: from bedivere.hansenpartnership.com ([66.63.167.143]:40804 "EHLO bedivere.hansenpartnership.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751681AbbFOVFC (ORCPT ); Mon, 15 Jun 2015 17:05:02 -0400 Message-ID: <1434402300.2170.84.camel@HansenPartnership.com> Subject: Re: [PATCH 17/20] [SCSI] mpt3sas: Use alloc_ordered_workqueue() API instead of create_singlethread_workqueue() API From: James Bottomley To: Sreekanth Reddy Cc: Joe Lawrence , "jejb@kernel.org" , Christoph Hellwig , "Martin K. Petersen" , "linux-scsi@vger.kernel.org" , Sathya Prakash , "linux-kernel@vger.kernel.org" Date: Mon, 15 Jun 2015 14:05:00 -0700 In-Reply-To: References: <1434102153-38581-1-git-send-email-Sreekanth.Reddy@avagotech.com> <1434102153-38581-18-git-send-email-Sreekanth.Reddy@avagotech.com> <557B4923.1020608@stratus.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.12.11 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2015-06-15 at 16:26 +0530, Sreekanth Reddy wrote: > On Sat, Jun 13, 2015 at 2:33 AM, Joe Lawrence wrote: > > On 06/12/2015 05:42 AM, Sreekanth Reddy wrote: > > ... > >> +#if defined(alloc_ordered_workqueue) > >> + ioc->firmware_event_thread = alloc_ordered_workqueue( > >> + ioc->firmware_event_name, WQ_MEM_RECLAIM); > >> +#else > >> + ioc->firmware_event_thread = create_singlethread_workqueue( > >> ioc->firmware_event_name); > >> +#endif > > > > Hi Sreekanth, > > > > I think the upstream version of this code can safely assume > > alloc_ordered_workqueue is defined, no? > > yes, upstream version of this code can safely assume that > alloc_ordered_workqueue is defined. > > While working in-house, I observed that some of the older kernels > doesn't defined this macro, so I have added this else section. The driver has to be defined for the current kernel. If you maintain a backport, that's fine, but not in the upstream driver. The reasons are fairly pragmatic: this code in the #else clause can't be compiled so it's just junk to the upstream driver and the static checkers will find it and you'll attract a flock of patches removing dead code. James