Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp3547540ybt; Tue, 23 Jun 2020 05:10:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwq4VHbgAKOCUl+DWhnK9ecKkrZ6FOJkoZ7mb5CYU5fUYW5C1yRV8kpiyxmEFg2Y26GYwML X-Received: by 2002:a50:f01d:: with SMTP id r29mr10194187edl.158.1592914256781; Tue, 23 Jun 2020 05:10:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592914256; cv=none; d=google.com; s=arc-20160816; b=bNJv6j6Ytd+uHfCaveKxwCVUwXqfpD15DjXEtiksLfdXrDYxHwDMRSAaVQExXQ/QDe Tcj7gwe8Hc+14hj9UD567GxINSCFq5UwBtNySDUTI27/H8cC7hT3DSXCV4mmCcrD+F4e 484E5cSbZgWRrI8MfUz9kBKCe9MUoiEJl3eD73h5YY1iSpbma4zDo+B74h9dDy9obA57 MBdNipFbba1937tOcw8wUGYsntpyPE+kxlc62jDhb1TLNGuU19MBChTDKd084KC04Dwu jU+5J/GnlZIFYkEYbZdj5Hpb9Rjh4uHzZSeD/AulV7MgAfxERPkxNMs9xEuAqYs8zP09 DfLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=6Re+WjjB1dMGkNf1EzZMfoTm0AtEm8gvJc3KpB0+MMw=; b=YkiGG9gf6qTEdJScbgcF/iGdduSosH6oMaH00sdmjbGfOMffY5YteGSYpNXonPDcV8 As9ueflIkIYtn3myc0Z6iWUS9UZ/KXn2LHZ4pklkU4HM9IsWspmr57dnWpZdDsLlBvU0 I/c7w0LrdnH+J4GZIHLuQFbJyfLlKbnwfh71hGrVxrT/Y733OrpqexVVJGux2kSO7+Ad elycaIOcr5eS/t88wiW2xZnn+w/LI3td4uTKtImBcP2dn+Y83dEQq2rzYraIQmOGKMv+ eC5RtiL6cwhXDJH+okgrlGoAnHhAlFWX6nKklFtJCyegDuPYW1PGFpvRBf6Zffh7k5Ae 35FA== 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 u29si2328932edi.469.2020.06.23.05.10.33; Tue, 23 Jun 2020 05:10:56 -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 S1732556AbgFWMIP (ORCPT + 99 others); Tue, 23 Jun 2020 08:08:15 -0400 Received: from mail-ot1-f68.google.com ([209.85.210.68]:43219 "EHLO mail-ot1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732333AbgFWMIO (ORCPT ); Tue, 23 Jun 2020 08:08:14 -0400 Received: by mail-ot1-f68.google.com with SMTP id u23so16293864otq.10; Tue, 23 Jun 2020 05:08:14 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=6Re+WjjB1dMGkNf1EzZMfoTm0AtEm8gvJc3KpB0+MMw=; b=iQjOmUUKOIWYO9ZuueIhSoE+mqvre9RCKCEvn8LuacTFmYlNZG0kpomMmMSOMickQK igIarSl7Lvh5brYeF0DLMP/YXb9a2DXtU0j/CNWI3NuAbJ9HF7qcS4Q6W3CLooBQKsxT E5DqO5VrP2/sAU1xx/0RX8QbOpVdzIGm4fKuFkmc8Xhm4sS+G1axRvw4EPXhyBikv7F9 5HmFMwQyq27rbapPQhPyonlK4+Z4cPlXmBiOksWig1Ar0BhUfnnkeIBIVUqz3eEVbzP1 ODjnYWFacs4llD+QEPeQ5Ami/7iNMusonspeLGc517HaQswDOZ5p3p67kXaqZojTtBRH pF1w== X-Gm-Message-State: AOAM53127YeGEojQzy34YR7J2hIwxrZLQpJ9pQ9QQ2nl6VgPLXxEdvaw tQVkjCguToTBPOVV6op9RAF0/nvW2TxdAiyiVIlNDVtV X-Received: by 2002:a05:6830:141a:: with SMTP id v26mr18196097otp.250.1592914093700; Tue, 23 Jun 2020 05:08:13 -0700 (PDT) MIME-Version: 1.0 References: <20200621054710.9915-1-dinghao.liu@zju.edu.cn> <44d7771e-5600-19c2-888a-dd226cbc4b50@nvidia.com> In-Reply-To: <44d7771e-5600-19c2-888a-dd226cbc4b50@nvidia.com> From: Geert Uytterhoeven Date: Tue, 23 Jun 2020 14:08:02 +0200 Message-ID: Subject: Re: [PATCH] [v4] dmaengine: tegra210-adma: Fix runtime PM imbalance on error To: Jon Hunter Cc: Dinghao Liu , Kangjie Lu , Laxman Dewangan , Vinod Koul , Dan Williams , Thierry Reding , dmaengine , linux-tegra , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Jon, More stirring in the cesspool ;-) On Tue, Jun 23, 2020 at 12:13 PM Jon Hunter wrote: > On 21/06/2020 06:47, Dinghao Liu wrote: > > pm_runtime_get_sync() increments the runtime PM usage counter even > > when it returns an error code. Thus a pairing decrement is needed on > > the error handling path to keep the counter balanced. > > So you have not mentioned here why you are using _noidle and not _put. > Furthermore, in this patch [0] you are not using _noidle to fix the same > problem in another driver. We should fix this in a consistent manner > across all drivers, otherwise it leads to more confusion. > > Finally, Rafael mentions we should just use _put [0] and so I think we > should follow his recommendation. > > Jon > > [0] https://lkml.org/lkml/2020/5/21/601 "_noidle() is the simplest one and it is sufficient." https://lore.kernel.org/linux-i2c/CAJZ5v0i87NGcy9+kxubScdPDyByr8ypQWcGgBFn+V-wDd69BHQ@mail.gmail.com/ You never know what additional things the other put* variants will start doing in the future... Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds