Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp1226650pxa; Thu, 20 Aug 2020 06:10:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzAJS7ySuzlUTiZqggWXPbNq0WDecyrgdD8wfGizFrW5T1dcrXYoKFbYJSAzfF7sVS1pcWG X-Received: by 2002:a17:907:119c:: with SMTP id uz28mr474076ejb.361.1597929053084; Thu, 20 Aug 2020 06:10:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597929053; cv=none; d=google.com; s=arc-20160816; b=q6yfw+MuCbht/1JfRsDvohsRK/3TNd1+9p+UpgJFL/2O3WtwBTBL9Gpp0txKpnpvE4 eaRjKAn1H330DRfDruiq0KQP/9cv0aZu0XFMshd0ivnxzy7nB+ClCYG1fwsc7kuBZGRP hO+Y3nRlhLs3VGwliSSgAYQNNVbBeos3B83s7x+V9YR4/25XPDj2ZijIA+xWLr5wA7pi F01ixtSq3Z53t6g4Qp642Ib3QfYXTPlHMmFFpdWj7VmeMlnK+ELzADpeNqMOb6jP0po0 oKeLudhKeV2ypNtnPLCEjUXKCMkcKWl2zB0Tz1RNDmdwNqcP2Ys7k28uEIOitQq/vuLi eezQ== 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=KqAsHDETQOry6yr0jg3Z6xIgB+xnOYYAudJegp+z6Xg=; b=riChQOfpVw4APZXCeo+bXnj+mxbSXp9tvmef6dlxVa+7CrWnm9Q/ewPNVrFlR8CFRq JO6rXXF0HPqVBhVtv6yDCaZ/ODVm2G/PlB4l4whZgcM7wTvfj1RiHejZ+OVG5/G4zSNu ARqaj1b0YfMZW59/gKNnNkC5H7m+9ygoQBt1VXx8MMh7pNWBB198PCOh/HiNYys1r67G KedtePRO+VN+q//S2ytORcYhuL1qhtxcmN/GJ+27yhvjLjcaAeLZDTI+4YY0pnm0crDU mABLmB6AGYHra0oZokVZPUWQUHcGtTETcCC8sd090HEqADDNzgs/5b6RDJQ7Z2rFlwop c3Og== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=WdBUSZcf; 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 gs14si1096023ejb.615.2020.08.20.06.10.27; Thu, 20 Aug 2020 06:10:53 -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=WdBUSZcf; 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 S1729800AbgHTNHp (ORCPT + 99 others); Thu, 20 Aug 2020 09:07:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34242 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728918AbgHTNHV (ORCPT ); Thu, 20 Aug 2020 09:07:21 -0400 Received: from mail-pj1-x1041.google.com (mail-pj1-x1041.google.com [IPv6:2607:f8b0:4864:20::1041]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B63BAC061385; Thu, 20 Aug 2020 06:07:20 -0700 (PDT) Received: by mail-pj1-x1041.google.com with SMTP id q1so611254pjd.1; Thu, 20 Aug 2020 06:07:20 -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=KqAsHDETQOry6yr0jg3Z6xIgB+xnOYYAudJegp+z6Xg=; b=WdBUSZcfs2umRDboNZztXlEAAV7GXKDNIeb3Qb2tD03c5LMqg/0C6EmPXDfMC4vGWL flyFLLiEZhr4QCDVgE3+cb2zmhMWitLjXqJ0jj0o4gYEw/evnDkw549tkqmeEGscRXiM 1ZB7RY9M0hxS28Kea7vrFQwB13yMu4HdnhSCKzBywdTbdjHcXiMtNyG0gf6YqYz6WqcB 9YmTgQO2wTo3eDMwEH9314ukhV0zyWbjsQoImrKwTmjhsu8rzPuPZeN8L/ViGy97D60m ZOvHlwd0+bLn5hL72D8Z7pc0CdOU3wnfqxyVHVM20A6dASHAcEzFQF+rxu70wU3I3XLh Cs9g== 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=KqAsHDETQOry6yr0jg3Z6xIgB+xnOYYAudJegp+z6Xg=; b=Pzv1M0ZNfF+X4Av74M8Z4Khsdmj3Ks1vUqu/uTENRnCHWk3BRzRmVwofOd//seYbHz X+p9Zhp5/KCiXiW3B65R33LbC4NixRmCatrAhz6Us1w1gmjmKRe7lGGpQw0relFxNtxv CsonANaYrEk4fxYfAPhVgoNYN4/lhC6QMdZyFfWNyTQDSrZz5tLFFONDjObPKuA96Ocg mtNYm7fcZzzMnz4EpYE9+L9heaHyA9EJJmx8+piCtMwvLl7/sJDS30NiU2W66fy9wy+m iMJYuvlX72wowEzAJkKaK2ARxFyb2NuVbxGXBzC0NKpluQ8VSHtJTEQUgstUqcg0M0nS TFCg== X-Gm-Message-State: AOAM5307qfckB3gxlEDTLQKHNeauvC2Knr2NVwEj3nLrNWGj5f0IdtgS V0WubRwTcC69/oNXC+iVpLC7UahNPRNR59n4DNM= X-Received: by 2002:a17:902:b098:: with SMTP id p24mr2309156plr.255.1597928840300; Thu, 20 Aug 2020 06:07:20 -0700 (PDT) MIME-Version: 1.0 References: <1597892486-3236-1-git-send-email-tiantao6@hisilicon.com> In-Reply-To: From: Andy Shevchenko Date: Thu, 20 Aug 2020 16:07:04 +0300 Message-ID: Subject: Re: [PATCH] iio: adc: adi-axi-adc: Use kobj_to_dev() instead of container_of() To: Alexandru Ardelean Cc: Tian Tao , Lars-Peter Clausen , "Hennerich, Michael" , Jonathan Cameron , Hartmut Knaack , Peter Meerwald-Stadler , linux-iio , LKML , Alexandru Ardelean 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, Aug 20, 2020 at 4:05 PM Andy Shevchenko wrote: > On Thu, Aug 20, 2020 at 12:10 PM Alexandru Ardelean > wrote: > > On Thu, Aug 20, 2020 at 6:04 AM Tian Tao wrote: > > > - struct device *dev = container_of(kobj, struct device, kobj); > > > + struct device *dev = kobj_to_dev(kobj); > And now this can be one line since dev is not used separately. On the other hand perhaps one object per line is better to read. -- With Best Regards, Andy Shevchenko