[PATCH] Serverworks IDE driver: missing static

Andrey Panin (pazke@orbita1.ru)
Wed, 22 May 2002 13:10:58 +0400


--b5gNqxB1S1yM7hjW
Content-Type: multipart/mixed; boundary="G4iJoqBmSsgzjUCe"
Content-Disposition: inline

--G4iJoqBmSsgzjUCe
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Hi,

svwks_tune_chipset() function contains 3 arrays which IMHO should be static.
Attached patch fixed it, saving for me 48 bytes of code :))
Compiles, but untested. Please consider applying.

Best regards.

--=20
Andrey Panin | Embedded systems software engineer
pazke@orbita1.ru | PGP key: wwwkeys.eu.pgp.net
--G4iJoqBmSsgzjUCe
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=patch-serverworks
Content-Transfer-Encoding: quoted-printable

diff -urN -X /usr/share/dontdiff linux.vanilla/drivers/ide/serverworks.c li=
nux/drivers/ide/serverworks.c
--- linux.vanilla/drivers/ide/serverworks.c Tue May 21 01:55:59 2002
+++ linux/drivers/ide/serverworks.c Wed May 22 03:36:04 2002
@@ -242,9 +242,9 @@
=20
static int svwks_tune_chipset(struct ata_device *drive, byte speed)
{
- byte udma_modes[] =3D { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05 };
- byte dma_modes[] =3D { 0x77, 0x21, 0x20 };
- byte pio_modes[] =3D { 0x5d, 0x47, 0x34, 0x22, 0x20 };
+ static byte udma_modes[] =3D { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05 };
+ static byte dma_modes[] =3D { 0x77, 0x21, 0x20 };
+ static byte pio_modes[] =3D { 0x5d, 0x47, 0x34, 0x22, 0x20 };
=20
struct ata_channel *hwif =3D drive->channel;
struct pci_dev *dev =3D hwif->pci_dev;

--G4iJoqBmSsgzjUCe--

--b5gNqxB1S1yM7hjW
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.1 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE862CiBm4rlNOo3YgRArHvAKCF2fqeAQXAedft02Tu0HqLcssMRgCeNaTV
7yQC8YEf6NnlpsMr9SkZZPU=
=08jO
-----END PGP SIGNATURE-----

--b5gNqxB1S1yM7hjW--
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/