Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp1732769pxb; Thu, 28 Oct 2021 09:04:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwQnfbBfvDJMixsTYmu294Vyi9pFfwSbsabFRdWNGwAe34CArg3R91ErjUSq5uBEVWyTB1e X-Received: by 2002:aa7:8213:0:b0:47b:fc35:db26 with SMTP id k19-20020aa78213000000b0047bfc35db26mr5138889pfi.1.1635437060557; Thu, 28 Oct 2021 09:04:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635437060; cv=none; d=google.com; s=arc-20160816; b=KW+cpPLOeQHc6BwJKeI96B1Tjc5mVBJ6ccC6MXhGaF+8YVRPiJfZRz6QuAS8axUUIj fFcfCerEwzqw/wVdv2jufMwqCUJBDIPnDG/ATIPJvvsIdX2Z0Ds4PeN1o7tizz7/g59g dl1vWv0+OWmGSGszvCkuNrq2/ZuzL/6AmNnMOf+XTIHufBnupr6wMY0Mu0MwifQF2Ww8 wpPADWQ4cNm6ENoeezroc5/viNPmqVK2pfgeRJZuWrCZFFwEu3MaIG2nN5QQTcWgVuhK V4BI29ur5Gt55PXp8TJaJbPgNLvSJG6Tug3K7hvh1czirJnPnWv6AX9TFysV63jmVQXS 1cZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=/EEWZEnGnGoh+PcRFDPCyL/rLMW5fal7yrJxx5/xYx8=; b=C1o1V8JBJfGwncwtwrjh/uVwBF6vZ3nhQAeCgYRYHW4+c/SnIJwIbFt6+6YJTavJN0 dZKEQ0fUkCEPS1xcxi52UreZIMWKzl2q/ilCu199R0fox8TCDCBvBOejZ7b4QL6W+k6F rXWbJZtHe3j/1C4VvGU3n8szcJ5waycrnZMG6q9EmROnCLlMN8YlBYRx4uD3qLwyGsO3 EqcbF2beimURQchTmFYc1lzBWIPBvCk5MnSRbtfGSUkph/agI9K25JHrbcmVA1tlRJWn 32howEqzLLyQtY9OkFOH2hU4Z/B1WQ7cPibR1oLClbCGPkq/cDmsFxP2M38O6W+xqOL5 iLmQ== 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m4si5191725pfk.76.2021.10.28.09.03.58; Thu, 28 Oct 2021 09:04:20 -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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229946AbhJ1QEi (ORCPT + 99 others); Thu, 28 Oct 2021 12:04:38 -0400 Received: from mail.kernel.org ([198.145.29.99]:45590 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230070AbhJ1QEh (ORCPT ); Thu, 28 Oct 2021 12:04:37 -0400 Received: from jic23-huawei (cpc108967-cmbg20-2-0-cust86.5-4.cable.virginm.net [81.101.6.87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D71A260551; Thu, 28 Oct 2021 16:02:08 +0000 (UTC) Date: Thu, 28 Oct 2021 17:06:34 +0100 From: Jonathan Cameron To: Cai Huoqing Cc: , , Subject: Re: [PATCH v2 1/2] iio: adc: ina2xx: Make use of the helper macro kthread_run() Message-ID: <20211028170634.4e815890@jic23-huawei> In-Reply-To: <20211021124254.3247-1-caihuoqing@baidu.com> References: <20211021124254.3247-1-caihuoqing@baidu.com> X-Mailer: Claws Mail 4.0.0 (GTK+ 3.24.30; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 21 Oct 2021 20:42:53 +0800 Cai Huoqing wrote: > Repalce kthread_create/wake_up_process() with kthread_run() > to simplify the code. > > Reviewed-by: Lars-Peter Clausen > Signed-off-by: Cai Huoqing Series applied to the togreg branch of iio.git which is pushed out initially as testing for 0-day to see if it can find any problems we missed. Thanks, Jonathan > --- > v1->v2: Sort with [2/2] patch as a series. > > drivers/iio/adc/ina2xx-adc.c | 9 ++++----- > 1 file changed, 4 insertions(+), 5 deletions(-) > > diff --git a/drivers/iio/adc/ina2xx-adc.c b/drivers/iio/adc/ina2xx-adc.c > index a4b2ff9e0dd5..360d7a00f60d 100644 > --- a/drivers/iio/adc/ina2xx-adc.c > +++ b/drivers/iio/adc/ina2xx-adc.c > @@ -842,15 +842,14 @@ static int ina2xx_buffer_enable(struct iio_dev *indio_dev) > dev_dbg(&indio_dev->dev, "Async readout mode: %d\n", > chip->allow_async_readout); > > - task = kthread_create(ina2xx_capture_thread, (void *)indio_dev, > - "%s:%d-%uus", indio_dev->name, > - iio_device_id(indio_dev), > - sampling_us); > + task = kthread_run(ina2xx_capture_thread, (void *)indio_dev, > + "%s:%d-%uus", indio_dev->name, > + iio_device_id(indio_dev), > + sampling_us); > if (IS_ERR(task)) > return PTR_ERR(task); > > get_task_struct(task); > - wake_up_process(task); > chip->task = task; > > return 0;