Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp872654pxf; Wed, 7 Apr 2021 13:50:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxHMuNA4tbicrD9RQhWB/jMpah9wod1q/w4Px/lhihxXu/dqGMhYz+ptrT4TUXcNld5uHc9 X-Received: by 2002:a05:6402:394:: with SMTP id o20mr6973959edv.10.1617828604756; Wed, 07 Apr 2021 13:50:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617828604; cv=none; d=google.com; s=arc-20160816; b=EvMFNNPjNiVRWTm9ZFWqti7HSckuVlZs7ztI75ENJWQtCZtjQjWcGgk9AwtZzGaU48 Ge1rvAh/0xxa2tK9h0gJQPYsWFcfsRQEeHIuXE2KxKNn4YnYs22aRJrcfAFoPRzQDy5k R+vX+E0I2tgdR7Wepj7AuuUTNCam7mljddcu+nCm5QQGouB1ZZxtVI7YGD2o/9KKYq+3 FZ//m+UCOjxkNwQX5fSRXJk8+O9lEy8LePPhGR6uSTLgUPMhwbzZeY1bGyd6QCidPhbR +xLNo5Rhhanwk2GlbkqBTBDpMizZvQ4iXFvHrSgw3k1nAA6hEQMBjMvn2EY40a/uIAeV /BOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:message-id :in-reply-to:subject:cc:to:from:date:ironport-hdrordr; bh=etCOoYwvKxT3wgIw4L6JLmD0hqSX7WQUt4iGzSGDhrA=; b=k23iCo0O6HMPOeHG0ITEBxX+YSEgnG1j2lcH13HvhgaVwGUa3UYHFmPqqJc7YhPGzA UIvjsymzCi2duvxkY0Lwf2Uc+cDgtCYZlNitSFnEv/9eYPmueoqp8n2aXZ7q/s9nQ/qu 9u6DwWqDSzTUf0r4g2exvfzcFjBm6wjEk+Q4u9f2z3HXAmIuS5BX4q/bNuBq5l6l8umr gEteJ2Tj07qtJv8E4JArMnaMlqCCArvigYOoiE0SyVvIoF9Va8d1h3gyX00atuttlDpy xi/1A7A2MiuH7OiuG98YexnFDX8jLaHZPtutBreYxQuDkj7JGnIARZmjSdqcYv8i1OzF yhVw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o13si21395348edi.135.2021.04.07.13.49.42; Wed, 07 Apr 2021 13:50:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350810AbhDGKQQ (ORCPT + 99 others); Wed, 7 Apr 2021 06:16:16 -0400 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:14148 "EHLO mail2-relais-roc.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235231AbhDGKQK (ORCPT ); Wed, 7 Apr 2021 06:16:10 -0400 IronPort-HdrOrdr: =?us-ascii?q?A9a23=3AlP0CQ6zLCEBxzWeuLsFjKrPwtb1zdoIgy1kn?= =?us-ascii?q?xilNYDZSddGVkN3roeQD2XbP+VUscVwDufTFAqmPRnvA6YV4iLN7AZ6OVBTr0V?= =?us-ascii?q?HDEKhM9o3nqgeMJwTb1spwkZhtaLJ/DtqYNzhHpOL3+hOxHdpl4PTvys6VrNzT?= =?us-ascii?q?xXtsUg1mApsIhztRMQqDF10zeQ8uP/YEPaCB7clKrSfIQxUqR/m8b0NrY8Hz4/?= =?us-ascii?q?XwtL+OW29lOzcXrCOrrR7A0s+cLzGomjQZWFp0sNMf2FmArCjFzsyYwpSG9iM?= =?us-ascii?q?=3D?= X-IronPort-AV: E=Sophos;i="5.82,203,1613430000"; d="scan'208";a="501970199" Received: from 173.121.68.85.rev.sfr.net (HELO hadrien) ([85.68.121.173]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 07 Apr 2021 12:15:57 +0200 Date: Wed, 7 Apr 2021 12:15:57 +0200 (CEST) From: Julia Lawall X-X-Sender: jll@hadrien To: Beatriz Martins de Carvalho cc: Matthew Wilcox , laurent.pinchart@ideasonboard.com, mchehab@kernel.org, gregkh@linuxfoundation.org, linux-media@vger.kernel.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, outreachy-kernel@googlegroups.com Subject: Re: [Outreachy kernel] [PATCH 1/2] staging: media: omap4iss: Ending line with argument In-Reply-To: Message-ID: References: <441d27060ff6477d0ad418f41e194b96373c1f7f.1617287509.git.martinsdecarvalhobeatriz@gmail.com> <20210401152844.GF351017@casper.infradead.org> 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 Wed, 7 Apr 2021, Beatriz Martins de Carvalho wrote: > > Em 01/04/21 16:28, Matthew Wilcox escreveu: > > On Thu, Apr 01, 2021 at 04:07:38PM +0100, Beatriz Martins de Carvalho wrote: > > > diff --git a/drivers/staging/media/omap4iss/iss.c > > > b/drivers/staging/media/omap4iss/iss.c > > > index dae9073e7d3c..e8f724dbf810 100644 > > > --- a/drivers/staging/media/omap4iss/iss.c > > > +++ b/drivers/staging/media/omap4iss/iss.c > > > @@ -559,9 +559,10 @@ static int iss_reset(struct iss_device *iss) > > > iss_reg_set(iss, OMAP4_ISS_MEM_TOP, ISS_HL_SYSCONFIG, > > > ISS_HL_SYSCONFIG_SOFTRESET); > > > - timeout = iss_poll_condition_timeout( > > > - !(iss_reg_read(iss, OMAP4_ISS_MEM_TOP, ISS_HL_SYSCONFIG) & > > > - ISS_HL_SYSCONFIG_SOFTRESET), 1000, 10, 100); > > > + timeout = iss_poll_condition_timeout(!(iss_reg_read(iss, > > > + OMAP4_ISS_MEM_TOP, > > > ISS_HL_SYSCONFIG) > > > + & > > > ISS_HL_SYSCONFIG_SOFTRESET), > > > + 1000, 10, 100); > > This is not a readability improvment. I would factor it out into its > > own function. > > Thanks for the review. How can I do this? I don't know how to do this. Copy the code into a new function. Then see what parameters this function needs for the various information it requires. The code will produce some results that are needed by the rest of the program. So you have to arrange via the return value that the proper variables are initialized after the function call. For example, x = a + b; could become int f(int a, int b) { return a + b; } x = f(a,b); That is a pretty silly change, but it gives the idea. julia > Beatriz Martins de Carvalho > > -- > You received this message because you are subscribed to the Google Groups > "outreachy-kernel" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to outreachy-kernel+unsubscribe@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/outreachy-kernel/e175859f-4f68-0408-415f-a3e19f7e4874%40gmail.com. >