Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp995340ybz; Fri, 17 Apr 2020 13:50:35 -0700 (PDT) X-Google-Smtp-Source: APiQypLqOW2rsaNpi8Rpui4fjb6G44/Eewl7fkdH6sHKB5vsVrWof4PG14ALieRCb061uXk9MeMK X-Received: by 2002:a17:906:b28f:: with SMTP id q15mr4717332ejz.188.1587156635781; Fri, 17 Apr 2020 13:50:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587156635; cv=none; d=google.com; s=arc-20160816; b=MVGY20pC+rWU4zCHggzqwINwVDuqURAtL37GkWsO9eV6CHPJefow+3HnFhwhFbFg9C nLy0t7oaSpWCx2zU3acYD1d5s8p3bxG79oJja8hP6rtHkIHrBzrC4nPYvSlDUO/nFbka LapPsUsjU8RKSBN6VM4oJNwkeUMim/yOjLHwoBt9Wlzuwg5pfT49vq4svm+jKJ3T5FTO UV+NWTGBh4B6eVGg2fsu4G7lJioAR44/zzGcdjNkDCGg4nwxx1cliKBgmfiLdDv9pvOU uRPn2okrPt/4j5MtHIflZHK80yMQ1GgW1IJVBRd3k3URdsQOWEwe1IOGwpI/flA8zWIM r/5g== 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:dkim-signature; bh=3scn4y13wLoI5WBhFj1I+bDIPfOwf4pzORC604k1TDE=; b=btxnbFi/FjDNk3qZOJMRJ6z3Dxbr1kXq8lJUk9G91MaIsEtd4xmhNpNJM2rDRu7dDg N10naTQGqN448Km8Ko/lLI0Y2vtO5CGrzA5s/X8x0tluUU9xjLLIJDo0chDqlv0zrf4c FMOZxonrQAU1+9L1FplxTx0V0dEg4iAf5JMCpPYARztUV1rbG2IA/mqnX3q/vLbgIPgw wXSAlPRdSaLErx41TFzd5UAHinPYxssiZyt2II4iZvsK/UqlBZt773d1CVHr79HNOsST 5Siwx57LUFXmMeMkuEJIB5+42RMnrqJe8awpl05WyYorSbt3h8DuOafQaUJASuYgxPSP Aa/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=jeMFdopT; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w13si14400101edt.382.2020.04.17.13.50.13; Fri, 17 Apr 2020 13:50:35 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=jeMFdopT; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726373AbgDQUqq (ORCPT + 99 others); Fri, 17 Apr 2020 16:46:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37420 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725915AbgDQUqp (ORCPT ); Fri, 17 Apr 2020 16:46:45 -0400 Received: from mail-io1-xd43.google.com (mail-io1-xd43.google.com [IPv6:2607:f8b0:4864:20::d43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C2278C061A0C; Fri, 17 Apr 2020 13:46:45 -0700 (PDT) Received: by mail-io1-xd43.google.com with SMTP id i19so3787821ioh.12; Fri, 17 Apr 2020 13:46:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=3scn4y13wLoI5WBhFj1I+bDIPfOwf4pzORC604k1TDE=; b=jeMFdopTigupSSjS8K2W+HV8kQ3jE5BQ7stWCfadkHtwQ+ftyF9mA9nOS6FvIpeqNy byvQuWo8ldodVtqPAPenCEOtcrRKGvgwPI8HdKv6EFFniAqSEE40HexTG6XKTjRNpnaB +kPS6Wt/bDSJ+V7TWej75KQkRgln9LstZD/TUefAhw/o3xki+So697rlq81RUTIjQTBJ i3q4z/AP2V1xtJi7I5Rj6OjsciIswpg4hmsJuweobDG+Ttj37iqhVVnyBgSPcDHQWrI3 MYyyCtrzVQifrApPQ+mjhNO2fjh72WtqODUcUUWEW6OYfvyU8OdCftcfyuo3BN4efTpo 2ryg== 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=3scn4y13wLoI5WBhFj1I+bDIPfOwf4pzORC604k1TDE=; b=Zp+4RLMmII5oKe5FLS0hwNyfiZfo4b7iulObu4cm7CAiv0gYxDfxvqJ0KyAfDCm133 IkNyH00xeRidE/8UFX8WQGrnMsY4sPrukPEGyT8Kn8fsj7IhauJoXvfOz9eAhG4b4zFx ZAwmHco/+zXP/fcjdDmpNWSawRrXQcZUCEzBc6zPNsFPLo6Gqo00ZzJLnnzG2LupBVaj Opjn/sgjBn37Ep39M/SjJXN3k0JTfgGhxG6KnuISfP+0z09GAV/YpYmQMlc17G+mKDBi j8k0cOGLu3rZ7jjAmZKw9Np6dh5mPB0GAssBFLTnzx0d5QcB3xLT2nMXg5pQigjJFS1x 3PaA== X-Gm-Message-State: AGi0PubYLCkASKnSIVaMAeRwmWxOTpix6uYHP3o6vLi/hiEFJ/xFEv34 SNDDWDJ3Z7UXFKD+zniPd7f0fhOnZ/7TuT5Gbhc= X-Received: by 2002:a02:211a:: with SMTP id e26mr5115830jaa.141.1587156405199; Fri, 17 Apr 2020 13:46:45 -0700 (PDT) MIME-Version: 1.0 References: <20200414134827.18674-1-zhengdejin5@gmail.com> <20200415102158.GH1141@ninjato> <20200415160757.GC17519@nuc8i5> In-Reply-To: <20200415160757.GC17519@nuc8i5> From: Andy Shevchenko Date: Fri, 17 Apr 2020 23:46:33 +0300 Message-ID: Subject: Re: [PATCH v1] i2c: busses: convert to devm_platform_get_and_ioremap_resource To: Dejin Zheng Cc: Wolfram Sang , Michal Simek , Wolfram Sang , Pierre Yves MORDRET , Maxime Coquelin , Alexandre TORGUE , Alain Volmat , linux-i2c , 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 On Thu, Apr 16, 2020 at 3:19 AM Dejin Zheng wrote: > > On Wed, Apr 15, 2020 at 12:21:58PM +0200, Wolfram Sang wrote: > > On Tue, Apr 14, 2020 at 09:48:27PM +0800, Dejin Zheng wrote: > > > use devm_platform_get_and_ioremap_resource() to simplify code, which > > > contains platform_get_resource() and devm_ioremap_resource(), it also > > > get the resource for use by the following code. > > > > > > Signed-off-by: Dejin Zheng > > > > Applied to for-next, because it seems 'the new way' but... > > > > > - r_mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); > > > - id->membase = devm_ioremap_resource(&pdev->dev, r_mem); > > > + id->membase = devm_platform_get_and_ioremap_resource(pdev, 0, &r_mem); > > > > ... guys, do you really think this one line reduction improves > > readability? Oh well... > > > Wolfram, Thank you for accepting it. From my personal point of view, > as long as the direction is correct, even small improvements are > worth doing. Thanks again for your tolerance. Do you have plans to move on from janitor work to something serious? -- With Best Regards, Andy Shevchenko