#include #include #include #include #include "ioexact.h" extern volatile sig_atomic_t sigint; ssize_t read_exact(int fd, void *buf, size_t len, bool mayexit) { ssize_t num = 0, written; while (len > 0 && !sigint) { if ((written = read(fd, buf, len)) < 0) { if (errno == EAGAIN && num > 0) continue; if (mayexit) return -1; else continue; } if (!written) return 0; len -= written; buf += written; num += written; } return num; } ssize_t write_exact(int fd, void *buf, size_t len, bool mayexit) { ssize_t num = 0, written; while (len > 0 && !sigint) { if ((written = write(fd, buf, len)) < 0) { if (errno == EAGAIN && num > 0) continue; if (mayexit) return -1; else continue; } if (!written) return 0; len -= written; buf += written; num += written; } return num; } d class='form'>
net-next plumbingsTobias Klauser
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLABBE Corentin <clabbe.montjoie@gmail.com>2017-02-08 09:31:20 +0100
committerDavid S. Miller <davem@davemloft.net>2017-02-08 15:11:27 -0500
commit64679e565a4a099c5d5dc2ecf103dcaf039ef8c7 (patch)
treec41fe7a43f2ed2602acbf8784bf4defe9c293878 /drivers
parent732fe78c0785aa8f1ff40a06a2fd5eb221a81157 (diff)
net: stmmac: remove unused variable in sysfs_display_ring
The u64 x variable in sysfs_display_ring is unused. This patch remove it. Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com> Acked-by: Giuseppe Cavallaro <peppe.cavallaro@st.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')