From patchwork Fri Nov 27 16: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: 7713951 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: X-Original-To: patchwork-linux-wireless@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 B260ABEEE1 for ; Fri, 27 Nov 2015 16:11:50 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 93BA92076A for ; Fri, 27 Nov 2015 16:11:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A2C7620768 for ; Fri, 27 Nov 2015 16:11:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754871AbbK0QLN (ORCPT ); Fri, 27 Nov 2015 11:11:13 -0500 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:17727 "EHLO mail3-relais-sop.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754763AbbK0QLM (ORCPT ); Fri, 27 Nov 2015 11:11:12 -0500 X-IronPort-AV: E=Sophos;i="5.20,352,1444687200"; d="scan'208";a="155376798" Received: from vaio-julia.rsr.lip6.fr ([132.227.76.33]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 27 Nov 2015 17:11:10 +0100 Date: Fri, 27 Nov 2015 17:10:58 +0100 (CET) From: Julia Lawall X-X-Sender: jll@hadrien To: "Kalle Valo Kalle Valo" cc: kbuild-all@01.org, Johannes Berg , Emmanuel Grumbach , Intel Linux Wireless , linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] iwlwifi: fix compare_const_fl.cocci warnings Message-ID: User-Agent: Alpine 2.10 (DEB 1266 2009-07-14) MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_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 Signed-off-by: Fengguang Wu Signed-off-by: Julia Lawall --- This looks a bit nicer around the other way, in my opinion. calib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- a/drivers/net/wireless/intel/iwlwifi/dvm/calib.c +++ b/drivers/net/wireless/intel/iwlwifi/dvm/calib.c @@ -311,7 +311,7 @@ static int iwl_sens_energy_cck(struct iw /* If previous beacon had too many false alarms, * give it some extra margin by reducing sensitivity again * (but don't go below measured energy of desired Rx) */ - if (IWL_FA_TOO_MANY == data->nrg_prev_state) { + if (data->nrg_prev_state == IWL_FA_TOO_MANY) { IWL_DEBUG_CALIB(priv, "... increasing margin\n"); if (data->nrg_th_cck > (max_nrg_cck + NRG_MARGIN)) data->nrg_th_cck -= NRG_MARGIN;