From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757428AbcJTCiy (ORCPT ); Wed, 19 Oct 2016 22:38:54 -0400 Received: from mail-sn1nam01on0067.outbound.protection.outlook.com ([104.47.32.67]:20096 "EHLO NAM01-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1757365AbcJTCiw (ORCPT ); Wed, 19 Oct 2016 22:38:52 -0400 From: "Kershner, David A" To: Cathal Mullaney CC: "Sell, Timothy C" , "gregkh@linuxfoundation.org" , *S-Par-Maintainer , "devel@driverdev.osuosl.org" , "linux-kernel@vger.kernel.org" Subject: RE: [PATCH v2] staging: unisys: visorbus: visorchannel: Refactor locking code to be statically deterministic. Thread-Topic: [PATCH v2] staging: unisys: visorbus: visorchannel: Refactor locking code to be statically deterministic. Thread-Index: AQHSKlH2Ai3JKZfJk0StySSiUVNDPKCwdUsQ Date: Thu, 20 Oct 2016 00:04:19 +0000 Message-ID: References: <1476876643-3708-1-git-send-email-chuckleberryfinn@gmail.com> <1476913405-4151-1-git-send-email-chuckleberryfinn@gmail.com> In-Reply-To: <1476913405-4151-1-git-send-email-chuckleberryfinn@gmail.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=David.Kershner@unisys.com; x-originating-ip: [96.227.75.170] x-ms-office365-filtering-correlation-id: b1bde8ad-23a4-4ad9-a28e-08d3f87ca3e4 x-microsoft-exchange-diagnostics: 1;CO2PR07MB2584;7:5FTz+UTg6elKR/cxN4qbtT9+PU6EMyJM0VMP+wIEAbH+v7i4fymNyfTQVii2WNg3zGMTwubZKPbWrwwsCVygJAmnOMpGOMjWL6Kca/HJLpg1YvT0u+do84C19Z1e+xe7mqXY/PXt6dv+xSnc4B2ijaZVyR9opgpYtoGy6X3uUDZn8ucMM9/v9858DP0ZoYps2C6L5+CGF7VvcN6Lg3lez1VZK4jkJh4Decxnm487aXarGSVUsEcyc+DuV6eC7blG+gj4rTBPdyDmfy6VVKvGo5+a9Q4Bah5c3K3BC5arUroMd43Vc3AUICxrX/bgsVnlIt22omAP5f+Pr4yZNCxqwwn07v2GmCJv7QZOMxHhePQ= x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:CO2PR07MB2584; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(174360191007938); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(6040176)(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001)(6042046)(6043046);SRVR:CO2PR07MB2584;BCL:0;PCL:0;RULEID:;SRVR:CO2PR07MB2584; x-forefront-prvs: 01018CB5B3 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(6009001)(7916002)(13464003)(199003)(189002)(7736002)(8936002)(1411001)(2906002)(6116002)(97736004)(81156014)(66066001)(3660700001)(122556002)(3846002)(5002640100001)(54356999)(305945005)(81166006)(76176999)(102836003)(50986999)(189998001)(106356001)(76576001)(74316002)(4326007)(7846002)(3280700002)(19580395003)(86362001)(6916009)(110136003)(106116001)(19580405001)(101416001)(586003)(105586002)(77096005)(8676002)(87936001)(7696004)(33656002)(2900100001)(9686002)(2950100002)(5660300001)(92566002)(10400500002)(99286002)(68736007);DIR:OUT;SFP:1101;SCL:1;SRVR:CO2PR07MB2584;H:SN1PR0701MB1838.namprd07.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 X-OriginatorOrg: unisys.com X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Oct 2016 00:04:19.7013 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 8d894c2b-238f-490b-8dd1-d93898c5bf83 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO2PR07MB2584 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by mail.home.local id u9K2d6U4022145 > -----Original Message----- > From: Cathal Mullaney [mailto:chuckleberryfinn@gmail.com] > Subject: [PATCH v2] staging: unisys: visorbus: visorchannel: Refactor locking > code to be statically deterministic. > > This patch makes locking in visorchannel_signalempty statically > deterministic. > As a result this patch fixes the sparse warning: > Context imbalance in 'visorchannel_signalempty' - different lock > contexts for basic block. > > The logic of the locking code doesn't change but the layout of the > original code is "frowned upon" > according to mails on sparse context checking. > Refactoring removes the warning and makes the code more readable. > > Signed-off-by: Cathal Mullaney Tested-by: David Kershner > --- > V2: Removed unnecessary variable initialization, as suggested by Tim Sell > . > > drivers/staging/unisys/visorbus/visorchannel.c | 30 ++++++++++++++++---- > ------