Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp2225009pxb; Fri, 25 Mar 2022 13:23:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx3p7Gj46V5Mx8YHrMu4TuxngYEfow2VxTzwXKj1oMbWHjYhDDwwPUaC5wWVc0lvKDZ94XK X-Received: by 2002:a05:6a00:1510:b0:4fa:f5fe:ffd5 with SMTP id q16-20020a056a00151000b004faf5feffd5mr8388967pfu.2.1648239827561; Fri, 25 Mar 2022 13:23:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648239827; cv=none; d=google.com; s=arc-20160816; b=F0ueY9m/Ptcy+giGlQVvsqpc48J6NItt8yCI/mU/zLzM3lWKA3AngsF+naT2oDGUdg KS+wcGYIi9sgkYsPXO8z7O2XflvS3Pm9UpMuY0oH3R//aFthSjNEgc1PdgI5uyR/72ts AD0Pg4VrhMLUIbhi1Ad0XYTXh2j/ZYnsfciSTLyXKy7kaQy13jv7XyBZSo/RR+2an8eM lcxZnUj3Xr3VpXXqM00yVayoAsWkYyZzvRShGpOlDEho6NEjQaQIlz4KQ0yYsygJrl7h YOcuHoTLN0UzNxP1REg/09Uqps/kVj3jQdOfwTZDjOdImC2lyPbgQ+li3KfufvCf4hva h6rw== 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 :message-id:date:subject:to:from:dkim-signature; bh=3/ScXRMHcRp85QtICSYw8maTQrMuT4aqx8kRP7vEhik=; b=KjEPzrqQJoDEZkS+cXzkv0ZpccbhxX/5Zpmmn3lopMxPCo+hth6jPYMvEwM6G3ZuXo h467P9Dvw/SEGd2J4lpTppxfHV5f7zTRiPgi5fLpHApwtdtHK++2Z/Sbr1yHJlPP1c+m f5gucYXfWLlcRQjT6TiLK+wOJGqxXf4FF+7hxiq4euZu+Y477sXQXQoeTrPqfNEY7NRr E2Ro7BdqqEsZBoD1TCXOkrbMXKknP3BgepZF+qOyV6CZDgKAcT1ZWgKxk7jNIu8seOXG /lR9YDG/GR/1wjwHC+ykA4dTddg6IQK6PI5ds9TysMY+PzhjgeXfcn3cR//a2aeqLXub uLgg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=iRcAsuNO; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:18 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id e29-20020aa7981d000000b004fa93c1118esi3502658pfl.173.2022.03.25.13.23.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Mar 2022 13:23:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=iRcAsuNO; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 0B26C258FF3; Fri, 25 Mar 2022 12:34:51 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230166AbiCYTgU (ORCPT + 99 others); Fri, 25 Mar 2022 15:36:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55872 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230296AbiCYTgD (ORCPT ); Fri, 25 Mar 2022 15:36:03 -0400 Received: from mail-pf1-x431.google.com (mail-pf1-x431.google.com [IPv6:2607:f8b0:4864:20::431]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E9CBF1D3072 for ; Fri, 25 Mar 2022 12:24:14 -0700 (PDT) Received: by mail-pf1-x431.google.com with SMTP id s8so7182544pfk.12 for ; Fri, 25 Mar 2022 12:24:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=3/ScXRMHcRp85QtICSYw8maTQrMuT4aqx8kRP7vEhik=; b=iRcAsuNOfP99ZwytexBptaa/dwVZYExy8wKAwjlRx/Vc7frWlJPDBcYGyqvtEz90Kj 6bGFfrN+v+emK+IL0vgyFJmgS4vaM7g9Efq7FGKKixLLsHO6RO9Oe/vL97gz7XwDdmz0 LM149W6+MHYwiMAJf1HYCDA4999QcsA1I8Sle9nEkEVrwsOJWG7cAWzrd/3Lw/pivtO4 F2qBwnxgvm6SdssDK3lP4O60kI/5arg4FxKJBRare+8vgLJlLlfopHWuLgzRHFcUPgS1 mRXRcRKxWozqLJs77Fuxh9vftI66OHme5c+PQQQ6PHbo9GpZIFvKtOf0f5A/rJgffv8Q gJNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=3/ScXRMHcRp85QtICSYw8maTQrMuT4aqx8kRP7vEhik=; b=BlN8pY4SSmQYunalJcdfer/SIdSM2ItJDNxEI/+aiZ1b6M1bsGeXgG3BpaWl2di1Ps pETRAadr0IhZDmKi4a3tuHsP01zAycQRVWiAQuHzj4Dpq5pqW2m8vP9zhlqadhJxZeRF p5n2Smqfu6/T7Mgt80iuJh/22G+Uhp4J0IXamzoqvhbiBvQu0a3xs4F96DXZ4JcDtdLn xsylYcEHXNUdkiOS3/PGjIYoglu4pIpi4bl1VZXQB7lYIxiidLX6eur5zIpTPL8dRXOV A8jf1jGS8e7tt25DCZKAtdUPc8IAh2iclEVfPbOp/TW+jF6vHsqDx6Pzs6Ns01AN26HL 0CYw== X-Gm-Message-State: AOAM532/Aqak5PZY5U0rFHF5chM2hTL10R+7DbPJXhZHnLjBswJQj7kw +6ZoSwMuQcO39xWj4dhRN7efIVxVJJQ= X-Received: by 2002:a17:902:7781:b0:153:35ef:e3d1 with SMTP id o1-20020a170902778100b0015335efe3d1mr13356022pll.116.1648232178815; Fri, 25 Mar 2022 11:16:18 -0700 (PDT) Received: from lvondent-mobl4.. (c-71-56-157-77.hsd1.or.comcast.net. [71.56.157.77]) by smtp.gmail.com with ESMTPSA id 6-20020a17090a194600b001c61a0f3debsm6624277pjh.10.2022.03.25.11.16.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Mar 2022 11:16:18 -0700 (PDT) From: Luiz Augusto von Dentz To: linux-bluetooth@vger.kernel.org Subject: [PATCH BlueZ] mgmt: Remove mgmt_set_verbose Date: Fri, 25 Mar 2022 11:16:17 -0700 Message-Id: <20220325181617.332701-1-luiz.dentz@gmail.com> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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-bluetooth@vger.kernel.org From: Luiz Augusto von Dentz The likes of btmon already decode the commands/events so there is no need to have the code hexdump their contents. --- src/shared/mgmt.c | 22 ---------------------- src/shared/mgmt.h | 1 - 2 files changed, 23 deletions(-) diff --git a/src/shared/mgmt.c b/src/shared/mgmt.c index cf518cc2b..4d7b64f2b 100644 --- a/src/shared/mgmt.c +++ b/src/shared/mgmt.c @@ -50,7 +50,6 @@ struct mgmt { mgmt_debug_func_t debug_callback; mgmt_destroy_func_t debug_destroy; void *debug_data; - bool verbose; }; struct mgmt_request { @@ -193,15 +192,6 @@ static void mgmt_log(struct mgmt *mgmt, const char *format, ...) va_end(ap); } -static void mgmt_hexdump(struct mgmt *mgmt, char dir, const void *data, - size_t len) -{ - if (!mgmt->verbose) - return; - - util_hexdump(dir, data, len, mgmt->debug_callback, mgmt->debug_data); -} - static bool send_request(struct mgmt *mgmt, struct mgmt_request *request) { struct iovec iov; @@ -229,8 +219,6 @@ static bool send_request(struct mgmt *mgmt, struct mgmt_request *request) DBG(mgmt, "[0x%04x] command 0x%04x", request->index, request->opcode); - mgmt_hexdump(mgmt, '<', request->buf, ret); - queue_push_tail(mgmt->pending_list, request); return true; @@ -382,8 +370,6 @@ static bool can_read_data(struct io *io, void *user_data) if (bytes_read < 0) return false; - mgmt_hexdump(mgmt, '>', mgmt->buf, bytes_read); - if (bytes_read < MGMT_HDR_SIZE) return true; @@ -602,14 +588,6 @@ bool mgmt_set_debug(struct mgmt *mgmt, mgmt_debug_func_t callback, return true; } -void mgmt_set_verbose(struct mgmt *mgmt, bool value) -{ - if (!mgmt) - return; - - mgmt->verbose = value; -} - bool mgmt_set_close_on_unref(struct mgmt *mgmt, bool do_close) { if (!mgmt) diff --git a/src/shared/mgmt.h b/src/shared/mgmt.h index 0f3e54c16..b413cea78 100644 --- a/src/shared/mgmt.h +++ b/src/shared/mgmt.h @@ -28,7 +28,6 @@ typedef void (*mgmt_debug_func_t)(const char *str, void *user_data); bool mgmt_set_debug(struct mgmt *mgmt, mgmt_debug_func_t callback, void *user_data, mgmt_destroy_func_t destroy); -void mgmt_set_verbose(struct mgmt *mgmt, bool value); bool mgmt_set_close_on_unref(struct mgmt *mgmt, bool do_close); -- 2.35.1