Received: by 2002:ac0:aed5:0:0:0:0:0 with SMTP id t21csp6172322imb; Fri, 8 Mar 2019 10:53:40 -0800 (PST) X-Google-Smtp-Source: APXvYqwWYWew52TNWxF/6nN5mXJK0BdERWWia1SZfycRjo54oq3r3Ljozilzt1FayzT6MppbHgXV X-Received: by 2002:a62:5249:: with SMTP id g70mr19939146pfb.115.1552071220162; Fri, 08 Mar 2019 10:53:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1552071220; cv=none; d=google.com; s=arc-20160816; b=YaXVQ0YFaxF3v0vtiDKmVY2/Qge9nF/eGf5hSGIVmNb4W56XKVnhyxbXy/yI/DsJEs lU0kPwT34zQpCThNFoBFyAUEpncBG0bZE8I67mCbQMjE+rCw78nmZ6fMH99cJ28+eW6c 3g8qZrbY5GSGxM8UhgnEOcrXmPH4niP/M3uhppB5ERXeTPJRRzgw+BqlCUNUBhj/hedK 94PZSR6OGfIU26sprcNNQXzdG0dV6OYxfdIj3NEjIAqAnhcCt3HvDX8CQr6Q4gJAXkxR teNMtePF08H3KTiIixpIgIzH25ahADXBnd3Af1f5WBKqYTbLV/JKJ5rNW8CdpuCsGkN/ fCWw== 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=zJ1s7QBmJPYQeio5yPNSS0BtdP9dcnIhV561/zFBAjc=; b=nR53AaX5uiReUT6JObLzXHYOrgPlhXioMwhgWVacoTY4Ddtl7pfj+D5OIa6yQHnwlc 69nKnYtRVXs9kTS9hqHR1IWZEZmylXFgM7Ts2CfTbtyzCrrZJRo48DcNH8yRYyAAtu81 tH7DI0PgoBdUDfzX++XWE76RMpb7XOEzzBLKQst2cceoM4+dBO/JnJ6tpYllUnGI+Si5 wD5do1Tv6HI2VD7v6JlwZe9j1ITKGuPWCMuvEI22seYExH4AQXyWwyr6rD2lwk743EhK 2/IOvzgHPw7Vb92iYkEQdQ4JtvclaCqljs6sLnQrbj/zVyHVc8CM0fc6KKAQA8E9ubsR i5Wg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=SuEboZJc; 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 k72si6919618pge.188.2019.03.08.10.53.22; Fri, 08 Mar 2019 10:53:40 -0800 (PST) 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=SuEboZJc; 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 S1727505AbfCHSwf (ORCPT + 99 others); Fri, 8 Mar 2019 13:52:35 -0500 Received: from mail-pf1-f194.google.com ([209.85.210.194]:37107 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727101AbfCHSwe (ORCPT ); Fri, 8 Mar 2019 13:52:34 -0500 Received: by mail-pf1-f194.google.com with SMTP id s22so14778717pfh.4 for ; Fri, 08 Mar 2019 10:52:34 -0800 (PST) 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=zJ1s7QBmJPYQeio5yPNSS0BtdP9dcnIhV561/zFBAjc=; b=SuEboZJcKxlqU4fK5KSrbXuFADC3O2oSaNW1Mkowjxjtv3nGhqBUxnKIfGiei/sC/n Z4dBc+BOThmsc1meXoNLeSlxJ3um99yn0HdSmjB3pB4aMSuJojbgtc1lJV9ECk4t2PCz 1k29sm2RMymvQUESe35oMDU5ty+cT0ucTJT9s= 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=zJ1s7QBmJPYQeio5yPNSS0BtdP9dcnIhV561/zFBAjc=; b=q3GY93e9uN+Wy1PmG18quxWZFzGVkmk5I3pPGA26nfHI8s4tqfmMsZN5fZTURcCGCF Rev0TSmuzQEM7opgXtKyFOBL694mwf3iw1kQVcVO0xKBtwugVuu+mHZizM4l5PCWHktk 0nMC7MxvtViPbO4gpS0khiLlhmjL9fl3Ha6/cHI+gJB6htTrRXfJdoIg15va1MoKe3eA K2I9b5fEFqBnOo0sFcOThGTDRo6hO6siRJI/nEAZrfg/zDoHnlGo9A5Q/inwdcm8jhj3 1oO3VjB70DyV+tPhe6M+XBRlBzOAo/aD0o2ylBHtI+Kz9l/H/MfB6pRhwpAQmmZ7Ye2J 962A== X-Gm-Message-State: APjAAAVRw/YssJRryXywTsK4/dnuCUAiFIjkNxzMUP+K64w2UD/hOlyG HlmZcv+nPf5op3gfAcxFDbXpjw== X-Received: by 2002:a17:902:20e3:: with SMTP id v32mr20295293plg.213.1552071153671; Fri, 08 Mar 2019 10:52:33 -0800 (PST) Received: from localhost ([2620:15c:202:1:75a:3f6e:21d:9374]) by smtp.gmail.com with ESMTPSA id h10sm11654799pfo.128.2019.03.08.10.52.33 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 08 Mar 2019 10:52:33 -0800 (PST) Date: Fri, 8 Mar 2019 10:52:32 -0800 From: Matthias Kaehlcke To: Balakrishna Godavarthi Cc: marcel@holtmann.org, johan.hedberg@gmail.com, linux-kernel@vger.kernel.org, linux-bluetooth@vger.kernel.org, hemantg@codeaurora.org, linux-arm-msm@vger.kernel.org, rjliao@codeaurora.org Subject: Re: [PATCH v1] Bluetooth: hci_qca: Enable the ldisc for ROME for x86 platforms. Message-ID: <20190308185232.GB69116@google.com> References: <20190307101722.25871-1-bgodavar@codeaurora.org> <20190307204224.GD138592@google.com> <6e0abe10b3ed44053e92ad6a21c75d93@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <6e0abe10b3ed44053e92ad6a21c75d93@codeaurora.org> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Mar 08, 2019 at 10:43:14AM +0530, Balakrishna Godavarthi wrote: > Hi Matthias, > > On 2019-03-08 02:12, Matthias Kaehlcke wrote: > > Hi Balakrishna, > > > > On Thu, Mar 07, 2019 at 03:47:22PM +0530, Balakrishna Godavarthi wrote: > > > When using btattach to setup Rome over ldisc we observed a crash > > > in qca_setup as it will try to access the serdev which is not > > > available in the ldisc proto. This patch will fix the crash by > > > support both the ldisc and serdev way in the qca hci_uart driver. > > > > > > Signed-off-by: Balakrishna Godavarthi > > > > Oh, I wasn't aware of the instantiation through ldisc and was actually > > considering to *remove* some of the seemingly unnecessary serdev > > checks. > > > > > --- > > > drivers/bluetooth/hci_qca.c | 47 > > > ++++++++++++++++++++++--------------- > > > 1 file changed, 28 insertions(+), 19 deletions(-) > > > > > > diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c > > > index 237aea34b69f..0a5c98d46864 100644 > > > --- a/drivers/bluetooth/hci_qca.c > > > +++ b/drivers/bluetooth/hci_qca.c > > > @@ -963,7 +963,7 @@ static int qca_set_baudrate(struct hci_dev > > > *hdev, uint8_t baudrate) > > > { > > > struct hci_uart *hu = hci_get_drvdata(hdev); > > > struct qca_data *qca = hu->priv; > > > - struct qca_serdev *qcadev; > > > + struct qca_serdev *qcadev = NULL; > > > > In many cases the only field that is accessed is qcadev->btsoc_type. I > > think something like 'qca_get_soc_type(struct hci_dev *hdev / struct > > hci_uart *hu)' would make things more readable. > > > [Bala]: sure will update this in other patch once this change is landed as > this has to > go in priority as we have crash coming. That's not how things should work, especially for fairly trivial changes. It requires reviewers to first spent time to review the patch that adds clutter and later spend more time to review the one that removes it. It's also easier to get a clean patch merged in the first place, rather than a noisy one. Anyway, here is my take at it: https://lore.kernel.org/patchwork/patch/1049014/ Please help with testing for ROME, unless you disagree with the approach. Thanks Matthias