From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752128AbdFTUJO (ORCPT ); Tue, 20 Jun 2017 16:09:14 -0400 Received: from mail-wr0-f196.google.com ([209.85.128.196]:33301 "EHLO mail-wr0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751029AbdFTUJK (ORCPT ); Tue, 20 Jun 2017 16:09:10 -0400 Date: Tue, 20 Jun 2017 21:08:58 +0100 From: Sudip Mukherjee To: Andy Shevchenko Cc: Greg Kroah-Hartman , "linux-kernel@vger.kernel.org" , linux-fbdev@vger.kernel.org, devel@driverdev.osuosl.org Subject: Re: [PATCH 1/2] staging: sm750fb: avoid conflicting vesafb Message-ID: <20170620200858.GA5287@sudip-laptop> References: <1497904378-4808-1-git-send-email-sudipm.mukherjee@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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, Jun 19, 2017 at 11:47:20PM +0300, Andy Shevchenko wrote: > On Mon, Jun 19, 2017 at 11:32 PM, Sudip Mukherjee > wrote: > > > > +#ifdef CONFIG_X86 > > + primary = pdev->resource[PCI_ROM_RESOURCE].flags & > > + IORESOURCE_ROM_SHADOW; > > +#endif > > Why do we need #ifdef? It has been done in exactly the same way it is done in drm drivers. All the drm drivers I have checked uses #ifdef. See for example: http://elixir.free-electrons.com/linux/v4.12-rc6/source/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c#L470 If you think #ifdef is not required, please send patch for the drm drivers, and we follow that change here also. > > In any case you may introduce a temporary variable to have pointer to resource > > struct resource *res = &pdev->resource[PCI_ROM_RESOURCE]; No, we will not want to do it in a different way than the way it is done by drm drivers. -- Regards Sudip