From patchwork Tue Jun 8 00:53:44 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Maciej_=C5=BBenczykowski?= X-Patchwork-Id: 456337 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 25069C47082 for ; Tue, 8 Jun 2021 00:53:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id F2F5661108 for ; Tue, 8 Jun 2021 00:53:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230494AbhFHAzn (ORCPT ); Mon, 7 Jun 2021 20:55:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49372 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230266AbhFHAzn (ORCPT ); Mon, 7 Jun 2021 20:55:43 -0400 Received: from mail-pj1-x1035.google.com (mail-pj1-x1035.google.com [IPv6:2607:f8b0:4864:20::1035]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B1A3FC061574; Mon, 7 Jun 2021 17:53:51 -0700 (PDT) Received: by mail-pj1-x1035.google.com with SMTP id md2-20020a17090b23c2b029016de4440381so1156969pjb.1; Mon, 07 Jun 2021 17:53:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=m6uCAgEmRBvwgNVPuMnu8ZzA3zqXUQKko37CRRAo32U=; b=DxBRAnjdlGnKI0c5WbmCz4z21w/1VTwspI1UzQ1p/QxpQ7ZpsCAXPhNKkrTjthK9Im yJE+Wvjr//vI9YRjVhd6m8gYcBLY1x2XZ1RXU3l8PmIqKXhj8MlSKr7GfAiA1o054WJl 69riA84U05mkiS7kgnn07zVgw9CAnysdQ/Vw2RlEeaoQv9ukRP0o/o7jqUwRBYEVgbuW I8D2ixgHO45Fs+HeX7js3bttWkEKRU9IN6eObbplZ169JTxNXE0fVQul0ZBkcDYPpDTf iS3au9O47u7PQy7Jo5sCrlba+Gjrf6PNuYhF4QsG9Qux0tCrU86i8lOrPk2IzsVwCHbd Fs3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=m6uCAgEmRBvwgNVPuMnu8ZzA3zqXUQKko37CRRAo32U=; b=lUjkBw4IFPCDoprs2Has/vkkpCeZstAa+V3MkrqjG6tNDdi1NzCTq2S6FVnJlBfwkW hByQHbI0RpW3hS6v0sijh1EUnXdRkPeqUxBIc/OTGJJCcdxMnyqGJxYn4yNL1oLJWu0Q ZSLO1KC7uNZveZ1dVkbh57hhO0FxxUvqhR4ZDa2BDw8fxdeGcutCtU8s7KuPlrcExRXI eelgHV+WJLsp0bhhd8zNTd+JjpVvPFNT2LBktKVnl280ctHQ8+y2XwjP0jWp77UCBkq9 KcP3efhDTb+kf3nz2R9XrQodu9FPVKkJ8kHGjb6cWtjLs9VOuxhAP5d2CA2eCrP0ZxY4 VeiA== X-Gm-Message-State: AOAM531emRe6S82bbnD47TsQ4txPjPD5un7/NZcw9tZYn4zOkvZhgVSU nE1Pa7KkcOx+hklBlrHXiWI= X-Google-Smtp-Source: ABdhPJwtAcFvqkph1cTg5IvbJrhX60lTqttu5NMTKEr9TMwmaxH1u+/uw630JwmoNpyCuHSt9HdqPg== X-Received: by 2002:a17:90a:ea14:: with SMTP id w20mr1881028pjy.65.1623113631254; Mon, 07 Jun 2021 17:53:51 -0700 (PDT) Received: from athina.mtv.corp.google.com ([2620:15c:211:0:34c3:22d8:b92a:ddfa]) by smtp.gmail.com with ESMTPSA id y5sm9313181pfb.19.2021.06.07.17.53.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Jun 2021 17:53:50 -0700 (PDT) From: =?utf-8?q?Maciej_=C5=BBenczykowski?= To: =?utf-8?q?Maciej_=C5=BBenczykowski?= Cc: Linux Kernel Mailing List , Brooke Basile , Bryan O'Donoghue , Felipe Balbi , Greg Kroah-Hartman , Lorenzo Colitti , Yauheni Kaliuta , Linux USB Mailing List Subject: [PATCH] f_ncm: ncm_bitrate (speed) is unsigned Date: Mon, 7 Jun 2021 17:53:44 -0700 Message-Id: <20210608005344.3762668-1-zenczykowski@gmail.com> X-Mailer: git-send-email 2.32.0.rc1.229.g3e70b5a671-goog MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org From: Maciej Żenczykowski [ 190.544755] configfs-gadget gadget: notify speed -44967296 This is because 4250000000 - 2**32 is -44967296. Cc: Brooke Basile Cc: Bryan O'Donoghue Cc: Felipe Balbi Cc: Greg Kroah-Hartman Cc: Lorenzo Colitti Cc: Yauheni Kaliuta Cc: Linux USB Mailing List Fixes: 9f6ce4240a2b ("usb: gadget: f_ncm.c added") Signed-off-by: Maciej Żenczykowski Acked-By: Lorenzo Colitti --- drivers/usb/gadget/function/f_ncm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/gadget/function/f_ncm.c b/drivers/usb/gadget/function/f_ncm.c index 019bea8e09cc..0d23c6c11a13 100644 --- a/drivers/usb/gadget/function/f_ncm.c +++ b/drivers/usb/gadget/function/f_ncm.c @@ -583,7 +583,7 @@ static void ncm_do_notify(struct f_ncm *ncm) data[0] = cpu_to_le32(ncm_bitrate(cdev->gadget)); data[1] = data[0]; - DBG(cdev, "notify speed %d\n", ncm_bitrate(cdev->gadget)); + DBG(cdev, "notify speed %u\n", ncm_bitrate(cdev->gadget)); ncm->notify_state = NCM_NOTIFY_CONNECT; break; }