From mboxrd@z Thu Jan 1 00:00:00 1970 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=-4.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no 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 A8BDAC388F7 for ; Sun, 25 Oct 2020 17:07:21 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 646B2208A9 for ; Sun, 25 Oct 2020 17:07:21 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="LasIaqI7" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 646B2208A9 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=RwjCl/LBKob1QE5sOq1TbLViW2+hWsBYEUSdSrc2v2Q=; b=LasIaqI7co7olD++DVH/T3agI AXua+Opr9KyZNzViF5rMWyy8LTXpjczxTOtkPOpZwpD5jpnjUF+aoGphantkAsVtCqvhyHr+Dm6Eh 8alvtaSpKZCT02dzpLS8pMUKf59THwpJZVdJDpDOMaDRsFTqfhA6uVGcWJyl4pcUN0Ym7R+Yc8bLN Ca4HxEj9bE9563zhTI0eRPO2aqGE/ZGpZDV6WUk5IjUmdeMTnZzZ0c0hYW4boBDgdygpRI0e+qx5n iHn6JS3GkBITiFno9zce2mY6yc/eJKnWs/dWB1+b+llP4YgHG2hQn2WccCeHGEJmslnJARKGpd1eY T5v/TBaGQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kWjSk-0007jC-QS; Sun, 25 Oct 2020 17:05:46 +0000 Received: from mail-lj1-f179.google.com ([209.85.208.179]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kWjSh-0007iM-Mx for linux-arm-kernel@lists.infradead.org; Sun, 25 Oct 2020 17:05:44 +0000 Received: by mail-lj1-f179.google.com with SMTP id i2so7226249ljg.4 for ; Sun, 25 Oct 2020 10:05:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=ROy9c6DCwb7BqeE8H1DusDotQcpBT+t8lOOmjmIQsso=; b=jkmjFT+0m997v0CwJ2pdgyzj3FKUE9+n+HVx3/YS6CqJiYpNwdg0D5UZ6wgHFjobha zLBsk8P7uEgmLMa91DnGGXHzFDPJUXc7uOxbpVPAWHoFbQJJfauwyNHzgiBFEw4uUhZZ 9vDGaTvx6aZx3wLGAERyP/cM1f3ky+VP9IKaJKta9PnN6tLp+3EsJu1MNhvnDKhnRS22 HdJOW4BUVe/Swevk91Gif0uh0QXlOYfFFrP42ujR9T5YY/+VAcLkJzeqFHAOBzXWyphY Rfd8iMwtPXfmneVY7A865EC5GDf05PgJFiMCVxvnyhsXO5fpeTtz8QHYHDc0NcjlRIbb 18gQ== X-Gm-Message-State: AOAM530U4bQlGnmA5+sQ3OS4BNpxMdUjk0capwiJLYa9xk+H/k/cVqmT dSPez9GQ2L+dolqCYaQOgeg= X-Google-Smtp-Source: ABdhPJyZsJ0KXIWx0VvyNrbAGN6S455M6+tpEVqIrL3N1jHU8GjpqzjpufuSs7aPj2BRg4Q9kTITDQ== X-Received: by 2002:a2e:9c85:: with SMTP id x5mr4326967lji.92.1603645542357; Sun, 25 Oct 2020 10:05:42 -0700 (PDT) Received: from xi.terra (c-beaee455.07-184-6d6c6d4.bbcust.telenor.se. [85.228.174.190]) by smtp.gmail.com with ESMTPSA id g22sm783000lfh.31.2020.10.25.10.05.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 Oct 2020 10:05:41 -0700 (PDT) Received: from johan by xi.terra with local (Exim 4.93.0.4) (envelope-from ) id 1kWjSj-0004jF-9z; Sun, 25 Oct 2020 18:05:45 +0100 Date: Sun, 25 Oct 2020 18:05:45 +0100 From: Johan Hovold To: Thomas Gleixner Subject: Re: [patch V2 03/13] USB: serial: keyspan_pda: Consolidate room query Message-ID: <20201025170545.GS26280@localhost> References: <20201019100629.419020859@linutronix.de> <20201019101109.903651690@linutronix.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20201019101109.903651690@linutronix.de> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201025_130543_823945_A3986376 X-CRM114-Status: GOOD ( 18.72 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Felipe Balbi , Thomas Winischhofer , Mathias Nyman , Peter Zijlstra , Greg Kroah-Hartman , Sebastian Andrzej Siewior , linux-usb@vger.kernel.org, LKML , Krzysztof Kozlowski , Johan Hovold , linux-samsung-soc@vger.kernel.org, Kukjin Kim , Valentina Manea , Duncan Sands , "Ahmed S. Darwish" , Alan Stern , linux-omap@vger.kernel.org, Shuah Khan , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Oct 19, 2020 at 12:06:32PM +0200, Thomas Gleixner wrote: > From: Sebastian Andrzej Siewior > > Having two copies of the same code doesn't make the code more readable and > allocating a buffer of 1 byte for a synchronous operation is a pointless > exercise. As Alan pointed out, this buffer is in fact required and not pointless at all even if reallocating it may be suboptimal. Note however that there are several further allocations done by usb_control_msg() for each control request. > Allocate a byte buffer at init which can be used instead. The buffer is > only used in open() and tty->write(). Console writes are not calling into > the query. open() obviously happens before write() and the writes are > serialized by bit 0 of port->write_urbs_free which protects also the > transaction itself. As I mentioned in my comments to the previous patch, I've rewritten the driver so that is no longer does this query in the write path. I kept the buffer allocation for now though in case you want to rework this one top. Johan _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel