From patchwork Wed Mar 5 16:16:11 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: wang yanqing X-Patchwork-Id: 3777321 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 0BFDABF540 for ; Wed, 5 Mar 2014 16:17:22 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0FB2120220 for ; Wed, 5 Mar 2014 16:17:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2D8D420218 for ; Wed, 5 Mar 2014 16:17:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752630AbaCEQRT (ORCPT ); Wed, 5 Mar 2014 11:17:19 -0500 Received: from mail-pb0-f53.google.com ([209.85.160.53]:42300 "EHLO mail-pb0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752229AbaCEQRS (ORCPT ); Wed, 5 Mar 2014 11:17:18 -0500 Received: by mail-pb0-f53.google.com with SMTP id rp16so1257279pbb.26 for ; Wed, 05 Mar 2014 08:17:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:mail-followup-to:mime-version :content-type:content-disposition:user-agent; bh=9YTvQ84fgtOg2oP+TjAjgUMRX7IRZZebMhh4M/DZtWI=; b=R0rNXK//qC8c5q0QnOOdrFrTbmIQvDUpWv+2GWk7KNRKjojYZcBa0wV5q382oB2Atn sN3uU3FBRLhKml6Ora2L/3JHuw7ggzO3QZAvGg/iyFWvRaIaANndmEYkbGgxZRFG6aYB F2sEdzdE8phDd41cWlnsVmacDnt+AlJ6tQ6lgOcGtyYW0NgiucqvxtwDREG7nWtYDYfK 4YHHPZ6gKRwiWDAArk6uwDa+didRGlvg5rOcKAlogFpMIOqLI1Uh3VoMrTJaxkr/g5Zv RJBVfLj/7XRNKUe5VLXiEoAuXea/thGfekMmf8c9ScDhtOqZP2WQBRCYHunFj8D93G5Q jX2g== X-Received: by 10.66.12.67 with SMTP id w3mr8085536pab.29.1394036237844; Wed, 05 Mar 2014 08:17:17 -0800 (PST) Received: from udknight.localhost ([117.30.98.13]) by mx.google.com with ESMTPSA id ja8sm9987817pbd.3.2014.03.05.08.17.09 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 05 Mar 2014 08:17:17 -0800 (PST) Received: from udknight.localhost (udknight.localhost [127.0.0.1]) by udknight.localhost (8.14.4/8.14.4) with ESMTP id s25GGFW2032488; Thu, 6 Mar 2014 00:16:21 +0800 Received: (from root@localhost) by udknight.localhost (8.14.4/8.14.4/Submit) id s25GGBDL032487; Thu, 6 Mar 2014 00:16:11 +0800 Date: Thu, 6 Mar 2014 00:16:11 +0800 From: Wang YanQing To: tomi.valkeinen@ti.com Cc: plagnioj@jcrosoft.com, fengguang.wu@intel.com, linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] video: fbdev: uvesafb: use CONFIG_X86_PAE surround _PAGE_NX check code Message-ID: <20140305161611.GA32461@udknight> Mail-Followup-To: Wang YanQing , tomi.valkeinen@ti.com, plagnioj@jcrosoft.com, fengguang.wu@intel.com, linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Because _PAGE_NX check will always false when we don't define CONFIG_X86_PAE for CONFIG_X86_32, so use CONFIG_X86_PAE surround the check code. Although I believe "smart" compile will optimize out and generate the same code, but use CONFIG_X86_PAE surround check code will clear it and prohibit warning from static source code analyze tool. [ This patch fix warning report by fengguang.wu@intel.com "drivers/video/fbdev/uvesafb.c:816 uvesafb_vbe_init() warn: bitwise AND condition is false here" ] Signed-off-by: Wang YanQing --- drivers/video/fbdev/uvesafb.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/video/fbdev/uvesafb.c b/drivers/video/fbdev/uvesafb.c index 509d452..102858c 100644 --- a/drivers/video/fbdev/uvesafb.c +++ b/drivers/video/fbdev/uvesafb.c @@ -813,6 +813,7 @@ static int uvesafb_vbe_init(struct fb_info *info) par->ypan = ypan; if (par->pmi_setpal || par->ypan) { +#ifdef CONFIG_X86_PAE if (__supported_pte_mask & _PAGE_NX) { par->pmi_setpal = par->ypan = 0; printk(KERN_WARNING "uvesafb: NX protection is active, " @@ -820,6 +821,9 @@ static int uvesafb_vbe_init(struct fb_info *info) } else { uvesafb_vbe_getpmi(task, par); } +#else + uvesafb_vbe_getpmi(task, par); +#endif } #else /* The protected mode interface is not available on non-x86. */