Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp102711imm; Thu, 20 Sep 2018 16:02:50 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZD35po3shnh/dTdKukfNo10X+wQzms2Kkd+03Hbp0Fa/i/rHa3rSeSmzv6sZUUxgW3wcaW X-Received: by 2002:a17:902:680e:: with SMTP id h14-v6mr5243206plk.177.1537484570777; Thu, 20 Sep 2018 16:02:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537484570; cv=none; d=google.com; s=arc-20160816; b=JbsOTAwzMpSqdee1XS6DybIStDqrdtHke6fNTe5kouLm7BrWDwehPj/WGYe9mVxwft 8eC8UxVKQ1BZb0Tib+l35UvWj7x2A1gEKGJAlfGkLlxYHmaC82rVkooMD1zA8DTSgNaW LvWXrJf/5M/CI7kgntsuwXLVdoCEnKXHI0EOHIjMfHGlTffQaNBqNtWrWBbbdNEBBYbw 3WNE9rsA7adNQVa7MSrz+uzZgxVgGWDAwIZnkhS8V0tpbDd5mX/E4BOgNJQpthtwjwQF az9bQ9F5DuYACFr9HuRlufnjl1S2d3b937W3rnbQz6s07GHFyA1L0hIlYXSQ+oaBU8+H TTrw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=XnbSOaS3cXFSRr7RaJlQgCJQp+2/RhzokjFBEA1aXJw=; b=NZAMzx1jvEm/UeJzL2SF9emzTlVyKwVUmyu23Xzt77AGV+IEf5UZ6OTWJJ+Aw2ywJP cVzdUnwk7Dr8vM4LghMAuzinqNeUUqfkv9v5e0XkarMb6emSHCPz7SoJFqAfCxPKnSI9 sMELd9+HJ6XIFnd6JK36hwv7H/4KDGxyYSK3/g+92CqDRmyOXeIgGA3mN1q5pvG8DlLr /SJmauOhsK4Gbs/i6IZxHdJpoJMGpXFDAgd7wc888apddjwj5GQ9cwf59ZDNkE/Sl+ej C95/TVCc18nX/MbDs4mgRkdVVGWfY86rSP0F6a4MvxpSoylVDhNj0hqPj3hKghMn1yay h8OQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=RJPr0zv7; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a190-v6si26802109pfb.144.2018.09.20.16.02.17; Thu, 20 Sep 2018 16:02:50 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=RJPr0zv7; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388584AbeIUErO (ORCPT + 99 others); Fri, 21 Sep 2018 00:47:14 -0400 Received: from mail-pl1-f196.google.com ([209.85.214.196]:33542 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726384AbeIUErO (ORCPT ); Fri, 21 Sep 2018 00:47:14 -0400 Received: by mail-pl1-f196.google.com with SMTP id b97-v6so5040420plb.0 for ; Thu, 20 Sep 2018 16:01:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=XnbSOaS3cXFSRr7RaJlQgCJQp+2/RhzokjFBEA1aXJw=; b=RJPr0zv705fZvYJeTcYQoYl+m4G1Z6F9hTm6q7h6UnUyhkEE0MDByNrt3eTT90nfPw scx/GDEMlnITYLYUzIVYl1Gb3HWmgh4BZQ3EdkGUYSTS1n95mKbegJcPNmmlnOi8bI5+ lHMFw452MJXhmQwfRCntrX0sBrEmXfAmPpT5Q= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=XnbSOaS3cXFSRr7RaJlQgCJQp+2/RhzokjFBEA1aXJw=; b=RxwdadV9UweyexckCBSC9ZMgcYdSuupGxDebBRIKvOaRQtf7wqeAIgxXjtb+iW2Fml azTFqhA0abFbjX65q5zpVWtSOwdEybqD6ffIMQoo5TPWBIEZTjd6Xdpp9nfv06PTIZ9D +FX96LbVU79Ey6cGR2xY2J6UJZ4xYCMks/elWeNQgHyTSL4rMeUycKqXOvvuojiuIoSa KzZ5q6q8t/ZJ+3n6BfkbpJ+CjcuguaiPt3hDlzGc1J3KMDGZK3kCvAZ1yem0jYmPoELR ps3OktT9ALrA/ql3F738cA57XqkeNEMDfA3pjn+lNJGxo9FCLkqnrpCgZ93nfRxznQau w8ZA== X-Gm-Message-State: APzg51AEgss/049u2cCVvOR2cJY7zz4hA2CglSlAbDh+1zgsp16PvNwv VMeksMYsIMeTDnKrqx4i7w8aNg== X-Received: by 2002:a17:902:ac86:: with SMTP id h6-v6mr4137818plr.103.1537484483721; Thu, 20 Sep 2018 16:01:23 -0700 (PDT) Received: from localhost ([2620:15c:202:1:b6af:f85:ed6c:ac6a]) by smtp.gmail.com with ESMTPSA id n9-v6sm41038945pfg.21.2018.09.20.16.01.21 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 20 Sep 2018 16:01:21 -0700 (PDT) Date: Thu, 20 Sep 2018 16:01:21 -0700 From: Matthias Kaehlcke To: Sinan Kaya Cc: Greg Kroah-Hartman , "Rafael J . Wysocki" , Sakari Ailus , Marcin Wojtas , Andy Shevchenko , Marcel Holtmann , Johan Hedberg , linux-kernel@vger.kernel.org, linux-bluetooth@vger.kernel.org, Balakrishna Godavarthi , Loic Poulain , Brian Norris Subject: Re: [PATCH 0/2] Add API to retrieve the Bluetooth Device Address (BD_ADDR) Message-ID: <20180920230121.GT22824@google.com> References: <20180920223436.202454-1-mka@chromium.org> <0ea65ca1-8d06-72d8-3bbe-693e09605a8a@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <0ea65ca1-8d06-72d8-3bbe-693e09605a8a@codeaurora.org> User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 20, 2018 at 06:45:58PM -0400, Sinan Kaya wrote: > On 9/20/2018 6:34 PM, Matthias Kaehlcke wrote: > > On some systems the Bluetooth Device Address (BD_ADDR) isn't stored > > on the Bluetooth chip itself. One way to configure the BD address is > > through the device tree. The btqcomsmd driver is an example, it can > > read the BD address from the DT property 'local-bd-address'. It is > > also planned to extend the hci_qca driver to support setting the BD > > address through the DT. > > > > To avoid redundant open-coded reading of 'local-bd-address' and error > > handling this series adds an API to retrieve the BD address of a device > > and adapts the btqcomsmd driver to use this API. > > I don't think you have got enough number of line savings to make this > code to be folded into property.c Most of the new lines are documentation ;-) > Not my call but seems redundant IMO. Certainly true if this was the only driver. However another one will follow soon and 'local-bd-address' is the official binding, so it's not unlikely there will be more. Also fwnode_get_bd_address() handles the case where the property exists but is all zeros which adds a few LOC, which isn't handled by the btqcomsmd driver. Cheers Matthias