Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp1764113pxb; Thu, 14 Apr 2022 13:33:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz3d4r36Jd+iH48XVqby3P2fEEWA1vsaJXJlyXrurG0/mvR/FnReyXInHlKgh1Zz8R3nLa+ X-Received: by 2002:a05:6402:5146:b0:415:fd95:6afa with SMTP id n6-20020a056402514600b00415fd956afamr4933484edd.200.1649968417730; Thu, 14 Apr 2022 13:33:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649968417; cv=none; d=google.com; s=arc-20160816; b=THBqaavC9PChmOojVmUP1zXHpdn/YMNkaY2ixHNi3kXUd+KBRG0BvTL1kJGuIpO0Ae ItZz1f+MPQLyN3Sy+CcOwwIITFz3/Ez+AfvcAmTibmSMyADuB7K49a9HALxZntHsp9Sl XsAMqHilIzZbMKwQiKO535KyIRk9FRdAeEaYUwdYb+Hxk+lYdmfrVImxgtmw3+HHr/KH eJ6+DzLWej0meW3NRgt8S5oFvIcYSIu+l/yS1jKhZ0GlYXvr2G5SbsSJvHaUZpbI2oiL Kn9WFQKBpq8P79pu1k/32E/2nr3axcQFVhAwqPgNitcCGc9uCXhdeDu8QI0o817n1DUx aBgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=m8YxcjRVz3dnPHyYXuegZHKssZd+aJ12XNnoe2p/lBU=; b=iI4c/dP4a/yc1SsIQ0iccQ4cCclugIvM7gUovsQRfF3Ptako9kuJsPGlc0wUtxjEwu oeI2khoZgKQX7MAJAhu+qvT88Zdqaw87utnW0EJntU3VrO1QOqCQ6Zg/7kDwZMKEF4Oo wEN1cQPVpjaCoxrjjEgpdFiM8mIpMow/PdaKOIpEumKW6yf/offhRFViexZAopBLktYF Ax4HjmeODpSpgI7DG7Uh6zzXYi3DorjfjFYB0qKT+Th/wwYv05YPyIJn6dcH2h0th9if fTiPZMiWr5VE5ratABlb47lx3FTmM9ds6X7XDueTP9GKCsxzEFeSDBQA0ztCr4KEjVlU m/fw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=QPwjbRUc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i1-20020a05640242c100b0042232407f27si37923edc.320.2022.04.14.13.32.49; Thu, 14 Apr 2022 13:33:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=QPwjbRUc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-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 S242554AbiDNLMP (ORCPT + 99 others); Thu, 14 Apr 2022 07:12:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41486 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242535AbiDNLMN (ORCPT ); Thu, 14 Apr 2022 07:12:13 -0400 Received: from mail-wr1-x42c.google.com (mail-wr1-x42c.google.com [IPv6:2a00:1450:4864:20::42c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9F89F1FCCF; Thu, 14 Apr 2022 04:09:48 -0700 (PDT) Received: by mail-wr1-x42c.google.com with SMTP id t1so6420085wra.4; Thu, 14 Apr 2022 04:09:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=m8YxcjRVz3dnPHyYXuegZHKssZd+aJ12XNnoe2p/lBU=; b=QPwjbRUcBx88ygWNhP59bVfbirAHGyWx1i1uPxg6m1hHpDGaMs86y1Ne73Tj0u1lh6 OeRnOjQRimNhxf8goiLu+sN01IRg6Z/pQnaBtDxu71IcresgOTbwx3c9aHj8oTptAP9D M/Qp6Ujd7rFESyQmNbGPwiOQ71SQeVmwWK5pEqhwnVkIvY9G6Uic/oUSUFjejgpA2Swh mHbikG+pTyZJJvUN2aoKiXwy/mk1cldVi6YnEzOAnZo5KFq7UdBNJmP6scaWqjGMy7h/ Hqu3HJrls59CICXd+XrrI/z8WHBltIz9XDKkYKdh5cU29pRm+ZG2hecSQpQWpsbhtLS5 ohRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=m8YxcjRVz3dnPHyYXuegZHKssZd+aJ12XNnoe2p/lBU=; b=RWN6h14/kAXTQX//nGfUlQLwxPnkNddf8/zzBR41wxqKyhnksJjx+KPn6Jfzz7Rntr DTtiIWG/xbJv3XEIgXCQbhCCVkj6KjJE0yKzRMENhA9m9WE5XtE3nVUTHuGuGSRJsLEt xsEQ77+/j33gfquuQCtTyX2/OgzlvnL4fy2OGRM8ac4SKoIrBNxzZIhj8blLLMnorjsl qYKz8hG3vRjprAOhxkYsdshH5shCr9HQ1DvjuaXl0rJGxUVWO7TqGbHBQjiTXYN3vGFM zZmL82Kmx1WFYYos1vMg6cbrU0JfFDY4livmsfregjocfvTuCBNiUpnvRJgjJW4k+kT4 Sjnw== X-Gm-Message-State: AOAM532A68cB6BF3mBFffUFHRpCsHVhupCzU69Vc2gWjoa9Km6j/QhSa wt6fCDi00/be9tHGlC9BLm0= X-Received: by 2002:adf:e90a:0:b0:209:ced9:f3ad with SMTP id f10-20020adfe90a000000b00209ced9f3admr1479725wrm.25.1649934587184; Thu, 14 Apr 2022 04:09:47 -0700 (PDT) Received: from localhost.localdomain ([94.73.37.128]) by smtp.gmail.com with ESMTPSA id f13-20020a5d64cd000000b0020787751295sm1694504wri.35.2022.04.14.04.09.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Apr 2022 04:09:46 -0700 (PDT) From: =?UTF-8?q?Jos=C3=A9=20Exp=C3=B3sito?= To: jikos@kernel.org Cc: benjamin.tissoires@redhat.com, spbnick@gmail.com, linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, =?UTF-8?q?Jos=C3=A9=20Exp=C3=B3sito?= Subject: [PATCH for-5.19/uclogic 1/4] HID: uclogic: Compress params format string Date: Thu, 14 Apr 2022 13:09:33 +0200 Message-Id: <20220414110936.146378-2-jose.exposito89@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220414110936.146378-1-jose.exposito89@gmail.com> References: <20220414110936.146378-1-jose.exposito89@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Nikolai Kondrashov Shorten the format string for printing out UC-Logic interface parameters so that it fits into a single log message. Signed-off-by: Nikolai Kondrashov Signed-off-by: José Expósito --- drivers/hid/hid-uclogic-params.h | 90 ++++++++++++++++++-------------- 1 file changed, 51 insertions(+), 39 deletions(-) diff --git a/drivers/hid/hid-uclogic-params.h b/drivers/hid/hid-uclogic-params.h index f2649e8f959d..ebf84b56746b 100644 --- a/drivers/hid/hid-uclogic-params.h +++ b/drivers/hid/hid-uclogic-params.h @@ -203,45 +203,57 @@ extern int uclogic_params_init(struct uclogic_params *params, /* Tablet interface parameters *printf format string */ #define UCLOGIC_PARAMS_FMT_STR \ - ".invalid = %s\n" \ - ".desc_ptr = %p\n" \ - ".desc_size = %u\n" \ - ".pen.desc_ptr = %p\n" \ - ".pen.desc_size = %u\n" \ - ".pen.id = %u\n" \ - ".pen.subreport_list[0] = {0x%02hhx, %hhu}\n" \ - ".pen.subreport_list[1] = {0x%02hhx, %hhu}\n" \ - ".pen.subreport_list[2] = {0x%02hhx, %hhu}\n" \ - ".pen.inrange = %s\n" \ - ".pen.fragmented_hires = %s\n" \ - ".pen.tilt_y_flipped = %s\n" \ - ".frame_list[0].desc_ptr = %p\n" \ - ".frame_list[0].desc_size = %u\n" \ - ".frame_list[0].id = %u\n" \ - ".frame_list[0].suffix = %s\n" \ - ".frame_list[0].re_lsb = %u\n" \ - ".frame_list[0].dev_id_byte = %u\n" \ - ".frame_list[0].touch_ring_byte = %u\n" \ - ".frame_list[0].touch_ring_max = %hhd\n" \ - ".frame_list[0].touch_ring_flip_at = %hhd\n" \ - ".frame_list[1].desc_ptr = %p\n" \ - ".frame_list[1].desc_size = %u\n" \ - ".frame_list[1].id = %u\n" \ - ".frame_list[1].suffix = %s\n" \ - ".frame_list[1].re_lsb = %u\n" \ - ".frame_list[1].dev_id_byte = %u\n" \ - ".frame_list[1].touch_ring_byte = %u\n" \ - ".frame_list[1].touch_ring_max = %hhd\n" \ - ".frame_list[1].touch_ring_flip_at = %hhd\n" \ - ".frame_list[2].desc_ptr = %p\n" \ - ".frame_list[2].desc_size = %u\n" \ - ".frame_list[2].id = %u\n" \ - ".frame_list[2].suffix = %s\n" \ - ".frame_list[2].re_lsb = %u\n" \ - ".frame_list[2].dev_id_byte = %u\n" \ - ".frame_list[2].touch_ring_byte = %u\n" \ - ".frame_list[2].touch_ring_max = %hhd\n" \ - ".frame_list[2].touch_ring_flip_at = %hhd\n" + ".invalid = %s\n" \ + ".desc_ptr = %p\n" \ + ".desc_size = %u\n" \ + ".pen = {\n" \ + "\t.desc_ptr = %p\n" \ + "\t.desc_size = %u\n" \ + "\t.id = %u\n" \ + "\t.subreport_list = {\n" \ + "\t\t{0x%02hhx, %hhu},\n" \ + "\t\t{0x%02hhx, %hhu},\n" \ + "\t\t{0x%02hhx, %hhu},\n" \ + "\t}\n" \ + "\t.inrange = %s\n" \ + "\t.fragmented_hires = %s\n" \ + "\t.tilt_y_flipped = %s\n" \ + "}\n" \ + ".frame_list = {\n" \ + "\t{\n" \ + "\t\t.desc_ptr = %p\n" \ + "\t\t.desc_size = %u\n" \ + "\t\t.id = %u\n" \ + "\t\t.suffix = %s\n" \ + "\t\t.re_lsb = %u\n" \ + "\t\t.dev_id_byte = %u\n" \ + "\t\t.touch_ring_byte = %u\n" \ + "\t\t.touch_ring_max = %hhd\n" \ + "\t\t.touch_ring_flip_at = %hhd\n" \ + "\t},\n" \ + "\t{\n" \ + "\t\t.desc_ptr = %p\n" \ + "\t\t.desc_size = %u\n" \ + "\t\t.id = %u\n" \ + "\t\t.suffix = %s\n" \ + "\t\t.re_lsb = %u\n" \ + "\t\t.dev_id_byte = %u\n" \ + "\t\t.touch_ring_byte = %u\n" \ + "\t\t.touch_ring_max = %hhd\n" \ + "\t\t.touch_ring_flip_at = %hhd\n" \ + "\t},\n" \ + "\t{\n" \ + "\t\t.desc_ptr = %p\n" \ + "\t\t.desc_size = %u\n" \ + "\t\t.id = %u\n" \ + "\t\t.suffix = %s\n" \ + "\t\t.re_lsb = %u\n" \ + "\t\t.dev_id_byte = %u\n" \ + "\t\t.touch_ring_byte = %u\n" \ + "\t\t.touch_ring_max = %hhd\n" \ + "\t\t.touch_ring_flip_at = %hhd\n" \ + "\t},\n" \ + "}\n" /* Tablet interface parameters *printf format arguments */ #define UCLOGIC_PARAMS_FMT_ARGS(_params) \ -- 2.25.1