Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp888059pxa; Sat, 22 Aug 2020 03:48:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwDSuXC04lh61SjZ5c160OVY6fNpHMIf+hrDQ59DXeMetabox0tlN9xQAA4u8L2frRaKbZz X-Received: by 2002:a17:907:b0b:: with SMTP id h11mr7210841ejl.371.1598093294475; Sat, 22 Aug 2020 03:48:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598093294; cv=none; d=google.com; s=arc-20160816; b=c0VWHEtkto0ZuSzDLTPdg8TZqXvdtfc+VBarZfdh7sbQOiBRmGVbpCTU+tmk9SlrHk Z8m72unPnoMES+IdksmJqyw6bp0vVEbJrG0sYqJIZhri7zNcTDuDinFIcKdjRp97Ak/a yIQK41sET7umi2gR72TIViIR3q6MvNFycDhjStqH1gpZO/GN8NaJe7B3bQMZ11IoEfbr G/IApSJEzpnfgomPUHN8wVflKWtEIOEsSSSbUzmAZGRJpzj29B+A6bivlQqKeDTTh7Q6 qfnnsQ0nMk2EgCN6918V3g2oEFUIa3Xy4RTHOBwrEixbHmEZWXBif4ILkOOYs6ALzFV1 PHFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=QijdJZxFX01P5Ih3mXUPXEM9gspbaJf3JPhhIxCALZk=; b=c1dBY5FhSFavk8WkvoNagXhiqDvZkBaLcL2Zmvo2uXASsoP6xD4CgrM/5bAg1r0Nts Z93cWUIHFmoNr87NIdwbU/YBZAnQCOj4W8chMbRIb+iQw0KV8pYu+l4iv9e/y7+s/+u5 Q1XK2eeF2Y9hKrCU5vUB/MKIse8Zfahj//7LC2YO/rxJGf0ICCHsIAkALjHpfhL1rsUp z3H4vPQF5QTD+Js+TCREQVVNlxJgIo58NgH32Iw9xcuJPxlQKSg0uGGrLqh6JIkePJY+ VWpZI3uWaOrO08e4e+qMTP94j0f6yONZdGUgm8Xdg77TSP+FWPAWrDi9oV636xONwdLd VKpw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=XkCcDK3B; 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 j14si3094810ejd.406.2020.08.22.03.47.50; Sat, 22 Aug 2020 03:48:14 -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=@kernel.org header.s=default header.b=XkCcDK3B; 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 S1727780AbgHVKoI (ORCPT + 99 others); Sat, 22 Aug 2020 06:44:08 -0400 Received: from mail.kernel.org ([198.145.29.99]:50388 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726222AbgHVKoH (ORCPT ); Sat, 22 Aug 2020 06:44:07 -0400 Received: from archlinux (cpc149474-cmbg20-2-0-cust94.5-4.cable.virginm.net [82.4.196.95]) (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 B285E206BE; Sat, 22 Aug 2020 10:44:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1598093047; bh=meJmEjFRlB1QI1uBtV7Y0+W0GJYcPJyhfPeQ0hUUVIo=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=XkCcDK3Bfv/h00ARERSsvgcU/QzqiGe2+JLT0Rax8ImT0VK20LhdYCZcj+N5oVymq 8gjY+kglB7EYsW/2vua2GLlY6HuE5Ycz+bbh7yZgptdYwcnqhXGfVv1T10rmgP1W27 Pd0Xaz74vnX2g/6+yZ589YW+Bs/A8vxk00Or02H8= Date: Sat, 22 Aug 2020 11:44:02 +0100 From: Jonathan Cameron To: Andy Shevchenko Cc: Alexandru Ardelean , Tian Tao , Lars-Peter Clausen , "Hennerich, Michael" , Hartmut Knaack , Peter Meerwald-Stadler , linux-iio , LKML , Alexandru Ardelean Subject: Re: [PATCH] iio: adc: adi-axi-adc: Use kobj_to_dev() instead of container_of() Message-ID: <20200822114402.5dd84fce@archlinux> In-Reply-To: References: <1597892486-3236-1-git-send-email-tiantao6@hisilicon.com> X-Mailer: Claws Mail 3.17.6 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 20 Aug 2020 16:07:04 +0300 Andy Shevchenko wrote: > 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. > Indeed, not clear one way or the others, so I'm going with the path of least resistance. Applied as is. Thanks, Jonathan