Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp5684000ybc; Wed, 27 Nov 2019 07:53:56 -0800 (PST) X-Google-Smtp-Source: APXvYqwO/BJ+PBMXKQc6+N6Qcqd09zMegj3sIzKjkffOWnxCE2Ha7lf/heo18o+0epwPj3fY0DBz X-Received: by 2002:a50:ef08:: with SMTP id m8mr33288611eds.14.1574870036146; Wed, 27 Nov 2019 07:53:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574870036; cv=none; d=google.com; s=arc-20160816; b=vWJh3pHKmld4ca/4GlpDxEWf+ndIG5amUCghIp2UtIU3gR/ZnJmdzBAWQEMtNFyz4N WQ/4eKKEVMJFAJgAkKgbdCDEV+ll1RbIX5FutyfbBRSzToYDa1TLhd/atF+OJz2dmwBx F3YfthypYqrjYd8I0uhp5CVdtAra5C0zkjZBh6dTVQAlwUt/nsCiAAvDsuhEqkuHdL+l WrMMMe5TA+5kEQ8ToFzqWFnNBRz09RjlYmW58fZvFO/5mcNAwsG4m1txkG4H8bzdrFj3 mwK3i+EhG9SzNfuDkNicvBVGETpethacRLd9ocxxl3BiKa4MMqUY9Qh0L86FoLqXsycw WNHQ== 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:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=kirhZUL19zah9X219nc8Fqlt19vTtnBHeGEvutnpeQE=; b=KY7Yea5l0Q4uoXkGo9BcuPXlP8OFyvTYjEp82BNUNy9Uzgc8THf5+3ONSqGZzmWmrf Kbb91UTp5JceyNZGn8V9f438kcjX/f9gJdy7zohEun9C2oPjGO/7ZXCKRrm3ERrcoXY4 PGacntkiLsXSia+Mhb995tAPsh8Df4yZY40RX89L0K+a9mzggcTexZ6ZK0koEq6vxMXU pd0efxZvdXxRaTTyRgou2E1pxI4C6srln86amV6g/UYIKD7FkLA8TYoevs16tJ1JXpmx bvvhUzMlrsG2avHnZXfIEWXYGX0sumN+oW0iTysbvcLsS4nSFZjR4tukNsftXKsO38b9 JoBQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=c0sgBcfi; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-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. [209.132.180.67]) by mx.google.com with ESMTP id d30si2837498edj.266.2019.11.27.07.53.16; Wed, 27 Nov 2019 07:53:56 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-bluetooth-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=@gmail.com header.s=20161025 header.b=c0sgBcfi; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-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 S1726558AbfK0Puy (ORCPT + 99 others); Wed, 27 Nov 2019 10:50:54 -0500 Received: from mail-ot1-f66.google.com ([209.85.210.66]:40045 "EHLO mail-ot1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726514AbfK0Puy (ORCPT ); Wed, 27 Nov 2019 10:50:54 -0500 Received: by mail-ot1-f66.google.com with SMTP id m15so19519297otq.7 for ; Wed, 27 Nov 2019 07:50:53 -0800 (PST) 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:content-transfer-encoding; bh=kirhZUL19zah9X219nc8Fqlt19vTtnBHeGEvutnpeQE=; b=c0sgBcfi/S4dSW80LuFux94D2ftakLtcCGUGCbH9vFVxhwCrZBmlT5rqVcYICy+fX9 /DPmf/8s9wHJehZpI7/K2o+zeYZn4cQbYrm9B45yUsUUv5TqY81P2QdHxvmp3fe2xiz2 34PAMjRFeJkHT+MWumqvLxFAF9rTegpXfHohl97fxGCRR6/e0BlpzSoItR1U6ZyHT03d jgdtHpCsOq07ZGxKGuhJgp1+NO7EE6QZf1rG5wqrOj3svA1nnOUXfNo2I+zHmNxzFDPZ vbw7peFAw2/BapCzxWfIjTqVCRLE1ghhK5buGzcSUxhk3k/OPR7in4WmAD3eBocRmcnC 0JLQ== 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:content-transfer-encoding; bh=kirhZUL19zah9X219nc8Fqlt19vTtnBHeGEvutnpeQE=; b=XJ2g9r84Nkxq/WFXwh9nUBaNLMXuevXzEwMMKTwmY1gwYPiFEg7lzxwMajT6ffr2Cx d1bPsS41yVl9NVRY85IhistLt+cOoacyvOiF9XgrGb9hlyztqJrSkwtkLQxsJmuQt8cV JMRMx/5+fEM4I0kZ7ThUS0+DPQffc2z5O3ObZUCfN3GYls0yaZZa0hiSFdl3UMhsfNjQ nYQplaJ6ac8ribfmsmzWo7s/2xnv2yX8PWiN0ytGUaXqvt8IZRYsijY+m7s9/wGXGtNB 3xZGyg6T5nHpLiiyGAAXqiOG1n8VePEX6EKYcq3o+1mYzaBEajC4GIC7yU5ljMa2Nn6M CNlQ== X-Gm-Message-State: APjAAAUUN5//TjZbbtvfrOQYOnoAV0/VygmDBLxZvs42qVhFTnzipvn/ l6RHfUWCWrE6I+CbbvsCKyhYuZNW5h9eB1wEVlHXRU4PAk0= X-Received: by 2002:a9d:7642:: with SMTP id o2mr3803350otl.177.1574869853205; Wed, 27 Nov 2019 07:50:53 -0800 (PST) MIME-Version: 1.0 References: <20191126212753.18455-1-pali.rohar@gmail.com> In-Reply-To: <20191126212753.18455-1-pali.rohar@gmail.com> From: Luiz Augusto von Dentz Date: Wed, 27 Nov 2019 17:50:40 +0200 Message-ID: Subject: Re: [PATCH] avctp: Set more descriptive name for uinput device To: =?UTF-8?Q?Pali_Roh=C3=A1r?= Cc: "linux-bluetooth@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Hi Pali, On Tue, Nov 26, 2019 at 11:31 PM Pali Roh=C3=A1r wro= te: > > --- > profiles/audio/avctp.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/profiles/audio/avctp.c b/profiles/audio/avctp.c > index 70a3e40b2..ae53587ad 100644 > --- a/profiles/audio/avctp.c > +++ b/profiles/audio/avctp.c > @@ -1181,8 +1181,7 @@ static int uinput_create(char *name) > } > > memset(&dev, 0, sizeof(dev)); > - if (name) > - strncpy(dev.name, name, UINPUT_MAX_NAME_SIZE - 1); > + snprintf(dev.name, sizeof(dev.name), "Bluetooth Audio/Video Remot= e Control%s%s", name ? " " : "", name ? name : ""); > > dev.id.bustype =3D BUS_BLUETOOTH; > dev.id.vendor =3D 0x0000; > -- > 2.11.0 It is already setting a bustype to BUS_BLUETOOTH why do you need to make it more specific, btw it needs to be limited to UINPUT_MAX_NAME_SIZE. Id say if we want to make it declare the connection type that probably something that needs to be encoded in the bus itself, like BUS_BLUETOOTH_AVCTP, BUS_BLUETOOTH_HOG, etc. --=20 Luiz Augusto von Dentz