Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C81FFC61DA4 for ; Mon, 6 Mar 2023 21:08:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229715AbjCFVI1 (ORCPT ); Mon, 6 Mar 2023 16:08:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58462 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229559AbjCFVIZ (ORCPT ); Mon, 6 Mar 2023 16:08:25 -0500 Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 798743BDB7 for ; Mon, 6 Mar 2023 13:08:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inria.fr; s=dc; h=date:from:to:cc:subject:in-reply-to:message-id: references:mime-version; bh=Myq4oW0FNya1g2HlnuWwn+aBlWwPfsZwgZBVa+Mj0+Y=; b=GAEXEMtJ/xd8nOEm5BB5kwL43wnEqTOGdjLCknmWLCcLqM7qJBbXVQKe uDppI9NsCl3E5825UEm1okaRRKCsP/PXjzRGk9UeYU0aJrfz3IrmAgj2z m5Oy7wzaDsVvI6Rdq7wMQjCZlh+DM12eWq7e86YLt3r+SHRJqyjP7TLFB 0=; Authentication-Results: mail2-relais-roc.national.inria.fr; dkim=none (message not signed) header.i=none; spf=SoftFail smtp.mailfrom=julia.lawall@inria.fr; dmarc=fail (p=none dis=none) d=inria.fr X-IronPort-AV: E=Sophos;i="5.98,238,1673910000"; d="scan'208";a="95740869" Received: from 231.85.89.92.rev.sfr.net (HELO hadrien) ([92.89.85.231]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Mar 2023 22:08:19 +0100 Date: Mon, 6 Mar 2023 22:08:21 +0100 (CET) From: Julia Lawall X-X-Sender: jll@hadrien To: Khadija Kamran cc: outreachy@lists.linux.dev, linux-staging@lists.linux.dev, gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] staging: axis-fifo: alignment should match opening parenthesis in axis-fifo.c In-Reply-To: Message-ID: References: User-Agent: Alpine 2.22 (DEB 394 2020-01-19) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 7 Mar 2023, Khadija Kamran wrote: > In file drivers/staging/axis-fifo/axis-fifo.c the alignment did not match the opening parenthesis. So, a few tabs were added to match the alignment to exactly where the parenthesis started. Hello Khadija, Thanks for plunging in and being the first participant! However, there are a number of issues with the proposed patch. 1. The log message should be at most around 70 characters wide. You have one long line. 2. The log message should be written in the imperative. Instead of "a few tabs were added", ay "add a few tabs". 3. I'm not sure that it is worth creating a very long line to respect the rule about (. On the other hand, the way the code is written at the moment seems to be very misleading, because the third argument to wait_event_interruptible_timeout is written as though it is the second argument to ioread32. So you can adjust the argument list of wait_event_interruptible_timeout so that at least all of the arguments that are not on the same line as the function call are lined up. julia > > Signed-off-by: Khadija Kamran > --- > drivers/staging/axis-fifo/axis-fifo.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/staging/axis-fifo/axis-fifo.c b/drivers/staging/axis-fifo/axis-fifo.c > index dfd2b357f484..6e959224add0 100644 > --- a/drivers/staging/axis-fifo/axis-fifo.c > +++ b/drivers/staging/axis-fifo/axis-fifo.c > @@ -383,7 +383,7 @@ static ssize_t axis_fifo_read(struct file *f, char __user *buf, > */ > mutex_lock(&fifo->read_lock); > ret = wait_event_interruptible_timeout(fifo->read_queue, > - ioread32(fifo->base_addr + XLLF_RDFO_OFFSET), > + ioread32(fifo->base_addr + XLLF_RDFO_OFFSET), > (read_timeout >= 0) ? > msecs_to_jiffies(read_timeout) : > MAX_SCHEDULE_TIMEOUT); > -- > 2.34.1 > > >