From patchwork Sun Dec 27 21:10:58 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julia Lawall X-Patchwork-Id: 7924101 Return-Path: X-Original-To: patchwork-platform-driver-x86@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id E228EBEEE5 for ; Sun, 27 Dec 2015 21:11:05 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 01DB520274 for ; Sun, 27 Dec 2015 21:11:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1EF992028D for ; Sun, 27 Dec 2015 21:11:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754516AbbL0VLB (ORCPT ); Sun, 27 Dec 2015 16:11:01 -0500 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:8464 "EHLO mail2-relais-roc.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752514AbbL0VLA (ORCPT ); Sun, 27 Dec 2015 16:11:00 -0500 X-IronPort-AV: E=Sophos;i="5.20,487,1444687200"; d="scan'208";a="194664358" Received: from 198.67.28.109.rev.sfr.net (HELO hadrien) ([109.28.67.198]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 27 Dec 2015 22:10:58 +0100 Date: Sun, 27 Dec 2015 22:10:58 +0100 (CET) From: Julia Lawall X-X-Sender: jll@localhost6.localdomain6 To: Weng Xuetian cc: Chen Yu , Darren Hart , linux-kernel@vger.kernel.org, platform-driver-x86@vger.kernel.org, Weng Xuetian , kbuild-all@01.org Subject: [PATCH] surface pro 4: fix compare_const_fl.cocci warnings Message-ID: User-Agent: Alpine 2.02 (DEB 1266 2009-07-14) MIME-Version: 1.0 Sender: platform-driver-x86-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: platform-driver-x86@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 Move constants to the right of binary operators. Generated by: scripts/coccinelle/misc/compare_const_fl.cocci CC: Weng Xuetian Signed-off-by: Fengguang Wu Signed-off-by: Julia Lawall --- It's not a big deal, but the constant on the right looks nicer to me. key_code seems like the more important information, so it is nice to see it first. surfacepro_button.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- To unsubscribe from this list: send the line "unsubscribe platform-driver-x86" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- a/drivers/platform/x86/surfacepro_button.c +++ b/drivers/platform/x86/surfacepro_button.c @@ -111,7 +111,7 @@ static void surface_button_notify(struct break; } input = button->input; - if (KEY_RESERVED == key_code) + if (key_code == KEY_RESERVED) return; if (pressed) pm_wakeup_event(&device->dev, 0);