Linux-mtd Archive mirror
 help / color / mirror / Atom feed
From: "Arnd Bergmann" <arnd@arndb.de>
To: "Zhihao Cheng" <chengzhihao1@huawei.com>,
	"Arnd Bergmann" <arnd@kernel.org>,
	"Richard Weinberger" <richard@nod.at>,
	"Miquel Raynal" <miquel.raynal@bootlin.com>,
	"Vignesh Raghavendra" <vigneshr@ti.com>,
	"Daniel Golle" <daniel@makrotopia.org>
Cc: linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mtd: ubi: avoid expensive do_div() on 32-bit machines
Date: Wed, 13 Mar 2024 14:51:14 +0100	[thread overview]
Message-ID: <1ee86ea9-fa91-4795-b5f8-2e57609ae65e@app.fastmail.com> (raw)
In-Reply-To: <ecc5d070-a773-1180-b50c-59088b23695e@huawei.com>

On Wed, Mar 13, 2024, at 14:43, Zhihao Cheng wrote:
> 在 2024/3/13 21:39, Arnd Bergmann 写道:
>
>>> Thanks for explaination, which means that do_div is used for 64-bit
>>> division to solve the link failure caused by missed libgcc. Since
>>> parameter 'from' is u32, there is no need to invoke do_div on a 32-bit
>>> platform, you just want to stop the wasting behavior on a 32-bit
>>> platform. Do I understand right?
>> 
> How do you find it? I mean there are so many types and many do_div 
> callers, do you have a static check tool?

I had a local fix with the same effect that I applied when
the code originally broke, but had not gotten around to
sending my fix.

After b8a77b9a5f9c ("mtd: ubi: fix NVMEM over UBI volumes on
32-bit systems") introduced a different workaround, I got the
link error because I had removed the do_div().

     Arnd

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

  reply	other threads:[~2024-03-13 13:51 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-13  8:46 [PATCH] mtd: ubi: avoid expensive do_div() on 32-bit machines Arnd Bergmann
2024-03-13 11:29 ` Zhihao Cheng
2024-03-13 11:53   ` Arnd Bergmann
2024-03-13 12:10     ` Zhihao Cheng
2024-03-13 12:21       ` Arnd Bergmann
2024-03-13 13:29         ` Zhihao Cheng
2024-03-13 13:39           ` Arnd Bergmann
2024-03-13 13:43             ` Zhihao Cheng
2024-03-13 13:51               ` Arnd Bergmann [this message]
2024-03-13 13:41 ` Zhihao Cheng

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1ee86ea9-fa91-4795-b5f8-2e57609ae65e@app.fastmail.com \
    --to=arnd@arndb.de \
    --cc=arnd@kernel.org \
    --cc=chengzhihao1@huawei.com \
    --cc=daniel@makrotopia.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=miquel.raynal@bootlin.com \
    --cc=richard@nod.at \
    --cc=vigneshr@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).