| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * linux/drivers/firmware/edd.c |
|---|
| 3 | 4 | * Copyright (C) 2002, 2003, 2004 Dell Inc. |
|---|
| .. | .. |
|---|
| 17 | 18 | * |
|---|
| 18 | 19 | * Please see http://linux.dell.com/edd/results.html for |
|---|
| 19 | 20 | * the list of BIOSs which have been reported to implement EDD. |
|---|
| 20 | | - * |
|---|
| 21 | | - * This program is free software; you can redistribute it and/or modify |
|---|
| 22 | | - * it under the terms of the GNU General Public License v2.0 as published by |
|---|
| 23 | | - * the Free Software Foundation |
|---|
| 24 | | - * |
|---|
| 25 | | - * This program is distributed in the hope that it will be useful, |
|---|
| 26 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 27 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| 28 | | - * GNU General Public License for more details. |
|---|
| 29 | | - * |
|---|
| 30 | 21 | */ |
|---|
| 31 | 22 | |
|---|
| 32 | 23 | #include <linux/module.h> |
|---|
| .. | .. |
|---|
| 350 | 341 | if (!info || !buf) |
|---|
| 351 | 342 | return -EINVAL; |
|---|
| 352 | 343 | |
|---|
| 353 | | - p += snprintf(p, left, "%u\n", info->legacy_max_cylinder); |
|---|
| 344 | + p += scnprintf(p, left, "%u\n", info->legacy_max_cylinder); |
|---|
| 354 | 345 | return (p - buf); |
|---|
| 355 | 346 | } |
|---|
| 356 | 347 | |
|---|
| .. | .. |
|---|
| 365 | 356 | if (!info || !buf) |
|---|
| 366 | 357 | return -EINVAL; |
|---|
| 367 | 358 | |
|---|
| 368 | | - p += snprintf(p, left, "%u\n", info->legacy_max_head); |
|---|
| 359 | + p += scnprintf(p, left, "%u\n", info->legacy_max_head); |
|---|
| 369 | 360 | return (p - buf); |
|---|
| 370 | 361 | } |
|---|
| 371 | 362 | |
|---|
| .. | .. |
|---|
| 380 | 371 | if (!info || !buf) |
|---|
| 381 | 372 | return -EINVAL; |
|---|
| 382 | 373 | |
|---|
| 383 | | - p += snprintf(p, left, "%u\n", info->legacy_sectors_per_track); |
|---|
| 374 | + p += scnprintf(p, left, "%u\n", info->legacy_sectors_per_track); |
|---|
| 384 | 375 | return (p - buf); |
|---|
| 385 | 376 | } |
|---|
| 386 | 377 | |
|---|