Received: by 10.192.165.156 with SMTP id m28csp709506imm; Thu, 19 Apr 2018 06:21:40 -0700 (PDT) X-Google-Smtp-Source: AIpwx48DhGBJI0ZMMsKnYDbWoO6riqawQiMLm7agoC9I6XSKju4PgwQmtGA04HaszDGLmoJAc3hL X-Received: by 10.98.182.15 with SMTP id j15mr5855891pff.115.1524144100316; Thu, 19 Apr 2018 06:21:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524144100; cv=none; d=google.com; s=arc-20160816; b=Iy2g+6gk5ccx6N0yIqWFsPI5O3WkKLAfNNWXNA/kZJ5ZY7NqGaKKQxQ3SC2HvtOidw rG0bGe9dBXatKgOOWArAPm5CAnSkmRNxrZqxrT3k30f3BWNAeqzi0LkDaQcKV3FQuPtf rUuYGnzcppctMEdKHHBiGYI9KPKFil+F3Li936udtjfY3fSTRqdOdc60WNzL8lEu3Y98 mfgv8EIEIE/GY6QKcA+2Rw41/pgdrU6QSy4U3wh6E0PEa1gLqtIVCiR1ZeTeOr0dhsrR dxJ1QB5UCmh/SJ8oAN5Pbhv7vExOBGQ5fhvKpUR4EkFBG3S6lduikbEyfLufSP6W2sFi AClw== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=bx9sYvujF3A9uXRKGtwofqhvBz8foS0KEtUOIuE4QUg=; b=Um8k2py8wqG66S3TbYPTPzpoBnJ74y8MPyNNmSR5F31ma4pL7HK50n3Q4K54g9R6YL H2XxrvJJxvcVj/lhEhFCzfG+dCaK0yDQ5jxEeRxwNbu7X43UU6LxiyJCthAE3WWNwwvI rxCiw8OCnMSCHuJUglfU7IwYLTrRUELwWKXsEVDZilnq+GNFlUgHgYqm35l8Ev9Cy0rX yBzasSVgsL1+uBb9MPj6cKdGEij8OcRQYz2iDDPSUBwtOm/IPtfRbeV9vtOjeP0QTxhw NV2z87//1acxAdaAoP8qwFYjNYBP2oKqs5yeneCCr0FkapPaC/OEv8ELYJNnZg1SbWPt K6QQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b40-v6si1381772plb.121.2018.04.19.06.21.25; Thu, 19 Apr 2018 06:21:40 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752241AbeDSNTG (ORCPT + 99 others); Thu, 19 Apr 2018 09:19:06 -0400 Received: from mx2.suse.de ([195.135.220.15]:32988 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750735AbeDSNTF (ORCPT ); Thu, 19 Apr 2018 09:19:05 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 9139AAF1F; Thu, 19 Apr 2018 13:19:03 +0000 (UTC) Subject: Re: [Xen-devel] [PATCH] Input: xen-kbdfront - allow better run-time configuration To: Oleksandr Andrushchenko , Jason Andryuk Cc: xen-devel@lists.xenproject.org, linux-input@vger.kernel.org, open list , dmitry.torokhov@gmail.com, lyan@suse.com, Boris Ostrovsky , andrii_chepurnyi@epam.com, Oleksandr Andrushchenko References: <20180418150445.9805-1-andr2000@gmail.com> <2bff035e-303e-d644-5f51-5e64150c097c@gmail.com> <5ed20b99-263d-d906-9349-d064eead36ad@gmail.com> From: Juergen Gross Message-ID: Date: Thu, 19 Apr 2018 15:19:02 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <5ed20b99-263d-d906-9349-d064eead36ad@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 19/04/18 15:12, Oleksandr Andrushchenko wrote: > On 04/19/2018 04:10 PM, Jason Andryuk wrote: >> On Thu, Apr 19, 2018 at 9:01 AM, Oleksandr Andrushchenko >> wrote: >>> Ok, so I'll send v2 with the following changes: >>> >>> diff --git a/drivers/input/misc/xen-kbdfront.c >>> b/drivers/input/misc/xen-kbdfront.c >>> index a3306aad40b0..d8cca212f737 100644 >>> --- a/drivers/input/misc/xen-kbdfront.c >>> +++ b/drivers/input/misc/xen-kbdfront.c >>> @@ -51,13 +51,13 @@ module_param_array(ptr_size, int, NULL, 0444); >>>   MODULE_PARM_DESC(ptr_size, >>>          "Pointing device width, height in pixels (default 800,600)"); >>> >>> -static unsigned int no_ptr_dev; >>> -module_param(no_ptr_dev, uint, 0); >>> +static bool no_ptr_dev; >>> +module_param(no_ptr_dev, bool, 0); >>>   MODULE_PARM_DESC(no_ptr_dev, >>>          "If set then no virtual pointing device exposed to the guest"); >>> >>> -static unsigned int no_kbd_dev; >>> -module_param(no_kbd_dev, uint, 0); >>> +static bool no_kbd_dev; >>> +module_param(no_kbd_dev, bool, 0); >>>   MODULE_PARM_DESC(no_kbd_dev, >>>          "If set then no virtual keyboard device exposed to the guest"); >> I prefer direct logic over inverse logic.  Maybe just use kbd_dev, >> default to true, but allow it to be set off? >> >> static bool kbd_dev = true; >> module_param(kbd_dev, bool, 0); > I have no preference here, either way works for me > Juergen, what do you think about the above? I really have no preference here. What should be taken into account is that boolean parameters don't need a value, meaning "true" in that case. This would make no sense for "kbd_dev" as it wouldn't change the default. Juergen