From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752458AbbCaPzm (ORCPT ); Tue, 31 Mar 2015 11:55:42 -0400 Received: from lists.s-osg.org ([54.187.51.154]:55741 "EHLO lists.s-osg.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750774AbbCaPzi (ORCPT ); Tue, 31 Mar 2015 11:55:38 -0400 Message-ID: <551AC378.80803@osg.samsung.com> Date: Tue, 31 Mar 2015 09:55:36 -0600 From: Shuah Khan Organization: Samsung Open Source Group User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: John Stultz CC: Prarit Bhargava , lkml , Thomas Gleixner , Richard Cochran Subject: Re: [PATCH 1/2] kselftests: timers: Make set-timer-lat fail more gracefully for !CAP_WAKE_ALARM References: <1427327073-19011-1-git-send-email-john.stultz@linaro.org> <5513EE03.1020507@redhat.com> In-Reply-To: <5513EE03.1020507@redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi John, I am seeing checkpatch warnings on this patch. See below. On 03/26/2015 05:31 AM, Prarit Bhargava wrote: > > > On 03/25/2015 07:44 PM, John Stultz wrote: >> The set-timer-lat test fails when testing CLOCK_BOOTTIME_ALARM >> or CLOCK_REALTIME_ALARM when the user isn't running as root or >> with CAP_WAKE_ALARM. >> >> So this patch improves the error checking so we report the >> issue more clearly and continue rather then reporting a failure. >> >> Cc: Shuah Khan >> Cc: Prarit Bhargava >> Cc: Thomas Gleixner >> Cc: Richard Cochran >> Signed-off-by: John Stultz >> Signed-off-by: John Stultz WARNING: Duplicate signature #115: Signed-off-by: John Stultz >> --- >> tools/testing/selftests/timers/set-timer-lat.c | 7 +++++++ >> 1 file changed, 7 insertions(+) >> >> diff --git a/tools/testing/selftests/timers/set-timer-lat.c b/tools/testing/selftests/timers/set-timer-lat.c >> index 3ea2eff..dbc9537c 100644 >> --- a/tools/testing/selftests/timers/set-timer-lat.c >> +++ b/tools/testing/selftests/timers/set-timer-lat.c >> @@ -139,6 +139,13 @@ int do_timer(int clock_id, int flags) >> >> err = timer_create(clock_id, &se, &tm1); >> if (err) { >> + if ((clock_id == CLOCK_REALTIME_ALARM) >> + || (clock_id == CLOCK_BOOTTIME_ALARM)) { > > I dunno of there is actually a CodingStyle rule for this, but I've always seen > this written with the operator on the first line: Yes it would be good to fix this one as well when you re-do the patch. > > if ((clock_id == CLOCK_REALTIME_ALARM) || > (clock_id == CLOCK_BOOTTIME_ALARM)) { > >> + printf("%-22s %s missing CAP_WAKE_ALARM? : [UNSUPPORTED]\n", >> + clockstring(clock_id), >> + flags ? "ABSTIME":"RELTIME"); > WARNING: line over 80 characters #130: FILE: tools/testing/selftests/timers/set-timer-lat.c:144: + printf("%-22s %s missing CAP_WAKE_ALARM? : [UNSUPPORTED]\n", thanks, -- Shuah -- Shuah Khan Sr. Linux Kernel Developer Open Source Innovation Group Samsung Research America (Silicon Valley) shuahkh@osg.samsung.com | (970) 217-8978