qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: Blue Swirl <blauwirbel@gmail.com>
Cc: qemu-trivial@nongnu.org, Riku Voipio <riku.voipio@iki.fi>,
	qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 10/11] arm: add missing static and remove unused functions
Date: Sun, 14 Oct 2012 21:09:40 +0100	[thread overview]
Message-ID: <CAFEAcA_M58F9F-NTY81Fau9_iH_s76f0KHQ_L5TOoC8+naWB6Q@mail.gmail.com> (raw)
In-Reply-To: <9b4ee7a47d8bc116e20f236a1ad9ed73a695123e.1350244587.git.blauwirbel@gmail.com>

On 14 October 2012 20:58, Blue Swirl <blauwirbel@gmail.com> wrote:
> index 2fc4137..2c02a83 100644
> --- a/hw/omap_gpmc.c
> +++ b/hw/omap_gpmc.c
> @@ -871,24 +871,3 @@ void omap_gpmc_attach(struct omap_gpmc_s *s, int cs, MemoryRegion *iomem)
>      f->iomem = iomem;
>      omap_gpmc_cs_map(s, cs);
>  }
> -
> -void omap_gpmc_attach_nand(struct omap_gpmc_s *s, int cs, DeviceState *nand)
> -{
> -    struct omap_gpmc_cs_file_s *f;
> -    assert(nand);
> -
> -    if (cs < 0 || cs >= 8) {
> -        fprintf(stderr, "%s: bad chip-select %i\n", __func__, cs);
> -        exit(-1);
> -    }
> -    f = &s->cs_file[cs];
> -
> -    omap_gpmc_cs_unmap(s, cs);
> -    f->config[0] &= ~(0xf << 10);
> -    f->config[0] |= (OMAP_GPMC_NAND << 10);
> -    f->dev = nand;
> -    if (nand_getbuswidth(f->dev) == 16) {
> -        f->config[0] |= OMAP_GPMC_16BIT << 12;
> -    }
> -    omap_gpmc_cs_map(s, cs);
> -}

Please don't delete this function, it is the public facing interface
for allowing board models to attach NAND devices to the GPMC. This
might not be used by anything currently in mainline, but it is used
by the omap3 beagle and overo board models in qemu-linaro (and which
I will upstream eventually, honest).

More generally I'm wary of deletion of apparently unused functions like
this one (or some of the others like the 'pcmcia eject card' function)
which are obviously intended to be public facing APIs to other
device models, unless they come with rationales along the lines of
"this function was added for purpose X but it is not needed now because
commit Y changed things so you do this with Z now".

> diff --git a/linux-user/arm/nwfpe/fpa11.c b/linux-user/arm/nwfpe/fpa11.c
> index eebd93f..3434036 100644
> --- a/linux-user/arm/nwfpe/fpa11.c
> +++ b/linux-user/arm/nwfpe/fpa11.c

In general anything in linux-user/arm/nwfpe is legacy code which
it's scarcely worth the effort of touching or reviewing.

thanks
-- PMM

  reply	other threads:[~2012-10-14 20:09 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-14 19:58 [Qemu-devel] [PATCH 00/11] static patches Blue Swirl
2012-10-14 19:58 ` [Qemu-devel] [PATCH 01/11] target-sparc: make do_unaligned_access static Blue Swirl
2012-10-14 19:58 ` [Qemu-devel] [PATCH 02/11] vl.c: add missing static Blue Swirl
2012-10-14 19:58 ` [Qemu-devel] [PATCH 03/11] vnc: add missing static and remove unused functions Blue Swirl
2012-10-14 19:58 ` [Qemu-devel] [PATCH 04/11] tap-win32: avoid a warning Blue Swirl
2012-10-14 19:58 ` [Qemu-devel] [PATCH 05/11] m48t59: remove unused m48t59_set_addr Blue Swirl
2012-10-15  0:04   ` Andreas Färber
2012-10-14 19:58 ` [Qemu-devel] [PATCH 06/11] sun4c: remove unused functions Blue Swirl
2012-10-14 19:58 ` [Qemu-devel] [PATCH 07/11] slirp: remove unused function u_sleep Blue Swirl
2012-10-14 19:58 ` [Qemu-devel] [PATCH 08/11] ppc: add missing static and remove unused functions Blue Swirl
2012-10-14 19:58 ` [Qemu-devel] [PATCH 09/11] target-ppc: make some functions static Blue Swirl
2012-10-14 19:58 ` [Qemu-devel] [PATCH 10/11] arm: add missing static and remove unused functions Blue Swirl
2012-10-14 20:09   ` Peter Maydell [this message]
2012-10-14 20:33     ` Blue Swirl
2012-10-14 20:35       ` Peter Maydell
2012-10-14 20:49         ` Blue Swirl
2012-10-14 20:55           ` Peter Maydell
2012-10-19 16:43             ` Blue Swirl
2012-10-15  0:01       ` Andreas Färber
2012-10-14 19:58 ` [Qemu-devel] [PATCH 11/11] exec: make some functions static Blue Swirl
2012-10-14 20:06 ` [Qemu-devel] [PATCH 00/11] static patches Blue Swirl
2012-10-14 20:32   ` malc
2012-10-14 20:41     ` Blue Swirl
2012-10-19  8:38 ` [Qemu-devel] [Qemu-trivial] " Stefan Hajnoczi
2012-10-19 17:49   ` Blue Swirl

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=CAFEAcA_M58F9F-NTY81Fau9_iH_s76f0KHQ_L5TOoC8+naWB6Q@mail.gmail.com \
    --to=peter.maydell@linaro.org \
    --cc=blauwirbel@gmail.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    --cc=riku.voipio@iki.fi \
    /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 NNTP newsgroup(s).